mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 18:28:25 +00:00
IFACE_PERMANENT interface flag in enumeration.
This commit is contained in:
committed by
Simon Kelley
parent
5c72bb9e33
commit
4568a6f842
@@ -159,6 +159,10 @@ int iface_enumerate(int family, void *parm, int (*callback)())
|
|||||||
|
|
||||||
if (ifr6.ifr_ifru.ifru_flags6 & IN6_IFF_DEPRECATED)
|
if (ifr6.ifr_ifru.ifru_flags6 & IN6_IFF_DEPRECATED)
|
||||||
flags |= IFACE_DEPRECATED;
|
flags |= IFACE_DEPRECATED;
|
||||||
|
|
||||||
|
if (!(ifr6.ifr_ifru.ifru_flags6 & (IN6_IFF_AUTOCONF | IN6_IFF_TEMPORARY)))
|
||||||
|
flags |= IFACE_PERMANENT;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ifr6.ifr_addr = *((struct sockaddr_in6 *) addrs->ifa_addr);
|
ifr6.ifr_addr = *((struct sockaddr_in6 *) addrs->ifa_addr);
|
||||||
|
|||||||
@@ -400,6 +400,7 @@ union mysockaddr {
|
|||||||
/* bits in flag param to IPv6 callbacks from iface_enumerate() */
|
/* bits in flag param to IPv6 callbacks from iface_enumerate() */
|
||||||
#define IFACE_TENTATIVE 1
|
#define IFACE_TENTATIVE 1
|
||||||
#define IFACE_DEPRECATED 2
|
#define IFACE_DEPRECATED 2
|
||||||
|
#define IFACE_PERMANENT 4
|
||||||
|
|
||||||
|
|
||||||
#define SERV_FROM_RESOLV 1 /* 1 for servers from resolv, 0 for command line. */
|
#define SERV_FROM_RESOLV 1 /* 1 for servers from resolv, 0 for command line. */
|
||||||
|
|||||||
@@ -265,6 +265,9 @@ int iface_enumerate(int family, void *parm, int (*callback)())
|
|||||||
|
|
||||||
if (ifa->ifa_flags & IFA_F_DEPRECATED)
|
if (ifa->ifa_flags & IFA_F_DEPRECATED)
|
||||||
flags |= IFACE_DEPRECATED;
|
flags |= IFACE_DEPRECATED;
|
||||||
|
|
||||||
|
if (ifa->ifa_flags & IFA_F_PERMANENT)
|
||||||
|
flags |= IFACE_PERMANENT;
|
||||||
|
|
||||||
if (addrp && callback_ok)
|
if (addrp && callback_ok)
|
||||||
if (!((*callback)(addrp, (int)(ifa->ifa_prefixlen), (int)(ifa->ifa_scope),
|
if (!((*callback)(addrp, (int)(ifa->ifa_prefixlen), (int)(ifa->ifa_scope),
|
||||||
|
|||||||
Reference in New Issue
Block a user