mirror of
https://github.com/haproxy/haproxy.git
synced 2026-06-14 20:10:32 -04:00
MINOR: tools: add a clear_addr() function to unset an address
This will be used to unset a from address.
This commit is contained in:
parent
772f0dd545
commit
422a0a5161
1 changed files with 6 additions and 0 deletions
|
|
@ -572,6 +572,12 @@ static inline unsigned int __full_hash(unsigned int a)
|
|||
return a * 3221225473U;
|
||||
}
|
||||
|
||||
/* sets the address family to AF_UNSPEC so that is_addr() does not match */
|
||||
static inline void clear_addr(struct sockaddr_storage *addr)
|
||||
{
|
||||
addr->ss_family = AF_UNSPEC;
|
||||
}
|
||||
|
||||
/* returns non-zero if addr has a valid and non-null IPv4 or IPv6 address,
|
||||
* otherwise zero.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue