2009-11-26 12:58:01 +02:00
|
|
|
Index: dnsmasq-2.51/src/netlink.c
|
|
|
|
===================================================================
|
|
|
|
--- dnsmasq-2.51.orig/src/netlink.c
|
|
|
|
+++ dnsmasq-2.51/src/netlink.c
|
2009-06-13 19:46:42 +03:00
|
|
|
@@ -129,6 +129,7 @@ int iface_enumerate(void *parm, int (*ip
|
2008-09-23 18:30:26 +03:00
|
|
|
ssize_t len;
|
|
|
|
static unsigned int seq = 0;
|
|
|
|
int family = AF_INET;
|
|
|
|
+ int ipv4_done = 0;
|
|
|
|
|
|
|
|
struct {
|
|
|
|
struct nlmsghdr nlh;
|
2009-06-13 19:46:42 +03:00
|
|
|
@@ -207,9 +208,12 @@ int iface_enumerate(void *parm, int (*ip
|
2008-09-23 18:30:26 +03:00
|
|
|
rta = RTA_NEXT(rta, len1);
|
|
|
|
}
|
|
|
|
|
|
|
|
- if (addr.s_addr && ipv4_callback)
|
|
|
|
+ if (addr.s_addr && ipv4_callback) {
|
|
|
|
if (!((*ipv4_callback)(addr, ifa->ifa_index, netmask, broadcast, parm)))
|
|
|
|
return 0;
|
|
|
|
+ else
|
|
|
|
+ ipv4_done = 1;
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
#ifdef HAVE_IPV6
|
|
|
|
else if (ifa->ifa_family == AF_INET6)
|
2009-06-13 19:46:42 +03:00
|
|
|
@@ -225,7 +229,7 @@ int iface_enumerate(void *parm, int (*ip
|
2008-09-23 18:30:26 +03:00
|
|
|
|
|
|
|
if (addrp && ipv6_callback)
|
|
|
|
if (!((*ipv6_callback)(addrp, ifa->ifa_index, ifa->ifa_index, parm)))
|
|
|
|
- return 0;
|
|
|
|
+ return ipv4_done;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
}
|
2009-11-26 12:58:01 +02:00
|
|
|
Index: dnsmasq-2.51/src/network.c
|
|
|
|
===================================================================
|
|
|
|
--- dnsmasq-2.51.orig/src/network.c
|
|
|
|
+++ dnsmasq-2.51/src/network.c
|
|
|
|
@@ -302,7 +302,7 @@ static int create_ipv6_listener(struct l
|
2008-09-23 18:30:26 +03:00
|
|
|
bind(tcpfd, (struct sockaddr *)&addr, sa_len(&addr)) == -1 ||
|
|
|
|
listen(tcpfd, 5) == -1 ||
|
|
|
|
bind(fd, (struct sockaddr *)&addr, sa_len(&addr)) == -1)
|
|
|
|
- return 0;
|
|
|
|
+ return 1;
|
|
|
|
|
|
|
|
l = safe_malloc(sizeof(struct listener));
|
|
|
|
l->fd = fd;
|