Merge branch 'master' of ssh://thekelleys.org.uk/var/local/git/dnsmasq

This commit is contained in:
Simon Kelley
2022-02-04 22:28:53 +00:00

View File

@@ -114,14 +114,9 @@ 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_LOCAL to check interface by name only. */
if (auth)
*auth = 0;
if (daemon->if_names || daemon->if_addrs) if (daemon->if_names || daemon->if_addrs)
{ {
ret = 0; 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)) 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;
} }