mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 18:28:25 +00:00
Merge branch 'master' of ssh://thekelleys.org.uk/var/local/git/dnsmasq
This commit is contained in:
@@ -114,14 +114,9 @@ int iface_check(int family, union all_addr *addr, char *name, int *auth)
|
||||
struct iname *tmp;
|
||||
int ret = 1, match_addr = 0;
|
||||
|
||||
/* Note: have to check all and not bail out early, so that we set the
|
||||
"used" flags.
|
||||
|
||||
/* Note: have to check all and not bail out early, so that we set the "used" flags.
|
||||
May be called with family == AF_LOCAL to check interface by name only. */
|
||||
|
||||
if (auth)
|
||||
*auth = 0;
|
||||
|
||||
if (daemon->if_names || daemon->if_addrs)
|
||||
{
|
||||
ret = 0;
|
||||
@@ -149,6 +144,9 @@ int iface_check(int family, union all_addr *addr, char *name, int *auth)
|
||||
if (tmp->name && wildcard_match(tmp->name, name))
|
||||
ret = 0;
|
||||
|
||||
if (auth)
|
||||
{
|
||||
*auth = 0;
|
||||
|
||||
for (tmp = daemon->authinterface; tmp; tmp = tmp->next)
|
||||
if (tmp->name)
|
||||
@@ -164,11 +162,12 @@ int iface_check(int family, union all_addr *addr, char *name, int *auth)
|
||||
IN6_ARE_ADDR_EQUAL(&tmp->addr.in6.sin6_addr, &addr->addr6))
|
||||
break;
|
||||
|
||||
if (tmp && auth)
|
||||
if (tmp)
|
||||
{
|
||||
*auth = 1;
|
||||
ret = 1;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user