1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00

socket_wrapper: make it possible to bind to '::'

metze
This commit is contained in:
Stefan Metzmacher 2009-03-03 19:40:57 +01:00
parent dea9621680
commit 81e2633e41

View File

@ -510,7 +510,9 @@ static int convert_in_un_alloc(struct socket_info *si, const struct sockaddr *in
cmp = in->sin6_addr; cmp = in->sin6_addr;
cmp.s6_addr[15] = 0; cmp.s6_addr[15] = 0;
if (IN6_ARE_ADDR_EQUAL(&swrap_ipv6, &cmp)) { if (IN6_IS_ADDR_UNSPECIFIED(&in->sin6_addr)) {
iface = socket_wrapper_default_iface();
} else if (IN6_ARE_ADDR_EQUAL(&swrap_ipv6, &cmp)) {
iface = in->sin6_addr.s6_addr[15]; iface = in->sin6_addr.s6_addr[15];
} else { } else {
errno = EADDRNOTAVAIL; errno = EADDRNOTAVAIL;