Make interfaces pointer private to interfaces.c and add get_interfaces()
accessor.
This commit is contained in:
@@ -71,7 +71,7 @@ addr_matches_if(char *n)
|
||||
addr.ip4.s_addr = inet_addr(n);
|
||||
}
|
||||
|
||||
for (ifp = interfaces; ifp != NULL; ifp = ifp->next) {
|
||||
for (ifp = get_interfaces(); ifp != NULL; ifp = ifp->next) {
|
||||
if (ifp->family != family)
|
||||
continue;
|
||||
switch (family) {
|
||||
@@ -154,7 +154,7 @@ addr_matches_if_netmask(char *n, char *m)
|
||||
}
|
||||
#endif /* HAVE_STRUCT_IN6_ADDR */
|
||||
|
||||
for (ifp = interfaces; ifp != NULL; ifp = ifp->next) {
|
||||
for (ifp = get_interfaces(); ifp != NULL; ifp = ifp->next) {
|
||||
if (ifp->family != family)
|
||||
continue;
|
||||
switch (family) {
|
||||
|
Reference in New Issue
Block a user