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,13 +114,8 @@ int iface_check(int family, union all_addr *addr, char *name, int *auth)
|
|||||||
struct iname *tmp;
|
struct iname *tmp;
|
||||||
int ret = 1, match_addr = 0;
|
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.
|
May be called with family == AF_LOCAL to check interface by name only. */
|
||||||
|
|
||||||
May be called with family == AF_LOCALto check interface by name only. */
|
|
||||||
|
|
||||||
if (auth)
|
|
||||||
*auth = 0;
|
|
||||||
|
|
||||||
if (daemon->if_names || daemon->if_addrs)
|
if (daemon->if_names || daemon->if_addrs)
|
||||||
{
|
{
|
||||||
@@ -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))
|
if (tmp->name && wildcard_match(tmp->name, name))
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
|
if (auth)
|
||||||
|
{
|
||||||
|
*auth = 0;
|
||||||
|
|
||||||
for (tmp = daemon->authinterface; tmp; tmp = tmp->next)
|
for (tmp = daemon->authinterface; tmp; tmp = tmp->next)
|
||||||
if (tmp->name)
|
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))
|
IN6_ARE_ADDR_EQUAL(&tmp->addr.in6.sin6_addr, &addr->addr6))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (tmp && auth)
|
if (tmp)
|
||||||
{
|
{
|
||||||
*auth = 1;
|
*auth = 1;
|
||||||
ret = 1;
|
ret = 1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user