Commit edf0bde0 authored by Simon Kelley's avatar Simon Kelley

Make --listen-address higher priority than --except-interface.

parent 8d030462
...@@ -92,6 +92,9 @@ version 2.67 ...@@ -92,6 +92,9 @@ version 2.67
Add --force-fast-ra option. Another thanks to Uwe Schindler. Add --force-fast-ra option. Another thanks to Uwe Schindler.
Make --listen-address higher priority than --except-interface
in all circumstances. Thanks to Thomas Hood for the bugreport.
version 2.66 version 2.66
Add the ability to act as an authoritative DNS Add the ability to act as an authoritative DNS
......
...@@ -112,7 +112,7 @@ int indextoname(int fd, int index, char *name) ...@@ -112,7 +112,7 @@ int indextoname(int fd, int index, char *name)
int iface_check(int family, struct all_addr *addr, char *name, int *auth) int iface_check(int family, struct all_addr *addr, char *name, int *auth)
{ {
struct iname *tmp; struct iname *tmp;
int ret = 1; int ret = 1, match_addr = 0;
/* Note: have to check all and not bail out early, so that we set the /* Note: have to check all and not bail out early, so that we set the
"used" flags. */ "used" flags. */
...@@ -134,16 +134,17 @@ int iface_check(int family, struct all_addr *addr, char *name, int *auth) ...@@ -134,16 +134,17 @@ int iface_check(int family, struct all_addr *addr, char *name, int *auth)
{ {
if (family == AF_INET && if (family == AF_INET &&
tmp->addr.in.sin_addr.s_addr == addr->addr.addr4.s_addr) tmp->addr.in.sin_addr.s_addr == addr->addr.addr4.s_addr)
ret = tmp->used = 1; ret = match_addr = tmp->used = 1;
#ifdef HAVE_IPV6 #ifdef HAVE_IPV6
else if (family == AF_INET6 && else if (family == AF_INET6 &&
IN6_ARE_ADDR_EQUAL(&tmp->addr.in6.sin6_addr, IN6_ARE_ADDR_EQUAL(&tmp->addr.in6.sin6_addr,
&addr->addr.addr6)) &addr->addr.addr6))
ret = tmp->used = 1; ret = match_addr = tmp->used = 1;
#endif #endif
} }
} }
if (!match_addr)
for (tmp = daemon->if_except; tmp; tmp = tmp->next) for (tmp = daemon->if_except; tmp; tmp = tmp->next)
if (tmp->name && wildcard_match(tmp->name, name)) if (tmp->name && wildcard_match(tmp->name, name))
ret = 0; ret = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment