61 lines
1.8 KiB
Diff
61 lines
1.8 KiB
Diff
|
From 8f41e9027aea265de019f448e94f9b5c94ab9274 Mon Sep 17 00:00:00 2001
|
||
|
From: Stefan Becker <chemobejk@gmail.com>
|
||
|
Date: Fri, 28 Feb 2020 20:49:21 +0200
|
||
|
Subject: [PATCH 2/2] interfaces: ignore only interfaces we really want to (II)
|
||
|
|
||
|
This improves commit bd4b47813844aa0e68e9074b3ac516c383ca8bab
|
||
|
|
||
|
There is a second place where this fix is needed.
|
||
|
---
|
||
|
agent/interfaces.c | 9 +++++----
|
||
|
1 file changed, 5 insertions(+), 4 deletions(-)
|
||
|
|
||
|
diff --git a/agent/interfaces.c b/agent/interfaces.c
|
||
|
index 993c660..c0e4a04 100644
|
||
|
--- a/agent/interfaces.c
|
||
|
+++ b/agent/interfaces.c
|
||
|
@@ -262,7 +262,7 @@ nice_interfaces_get_local_ips (gboolean include_loopback)
|
||
|
GList *loopbacks = NULL;
|
||
|
#ifdef IGNORED_IFACE_PREFIX
|
||
|
const gchar **prefix;
|
||
|
- gboolean ignored = FALSE;
|
||
|
+ gboolean ignored;
|
||
|
#endif
|
||
|
|
||
|
if (getifaddrs (&results) < 0)
|
||
|
@@ -310,7 +310,7 @@ nice_interfaces_get_local_ips (gboolean include_loopback)
|
||
|
nice_debug ("Ignoring interface %s as it matches prefix %s",
|
||
|
ifa->ifa_name, *prefix);
|
||
|
g_free (addr_string);
|
||
|
- ignored = true;
|
||
|
+ ignored = TRUE;
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
@@ -347,7 +347,7 @@ nice_interfaces_get_local_ips (gboolean include_loopback)
|
||
|
GList *loopbacks = NULL;
|
||
|
#ifdef IGNORED_IFACE_PREFIX
|
||
|
const gchar **prefix;
|
||
|
- gboolean ignored = FALSE;
|
||
|
+ gboolean ignored;
|
||
|
#endif
|
||
|
|
||
|
if ((sockfd = socket (AF_INET, SOCK_DGRAM, IPPROTO_IP)) < 0) {
|
||
|
@@ -410,11 +410,12 @@ nice_interfaces_get_local_ips (gboolean include_loopback)
|
||
|
}
|
||
|
|
||
|
#ifdef IGNORED_IFACE_PREFIX
|
||
|
+ ignored = FALSE;
|
||
|
for (prefix = ignored_iface_prefix_list; *prefix; prefix++) {
|
||
|
if (g_str_has_prefix (ifr->ifr_name, *prefix)) {
|
||
|
nice_debug ("Ignoring interface %s as it matches prefix %s",
|
||
|
ifr->ifr_name, *prefix);
|
||
|
- ignored = true;
|
||
|
+ ignored = TRUE;
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
--
|
||
|
2.24.1
|
||
|
|