1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

lib/util: let is_zero_addr() return true for AF_UNSPEC

It means the completely zero'ed structure is detected
as zero address, as AF_UNSPEC is 0.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
Stefan Metzmacher 2023-12-21 13:02:43 +01:00
parent 10b084f824
commit d52f727906

View File

@ -642,6 +642,9 @@ bool is_zero_addr(const struct sockaddr_storage *pss)
const struct in_addr *pin = &((const struct sockaddr_in *)pss)->sin_addr;
return is_zero_ip_v4(*pin);
}
if (pss->ss_family == AF_UNSPEC) {
return true;
}
return false;
}