The -i or --device command line option contains the device names
that we should use. Unfortunately the check fails if there are
multiple interfaces in that list and we ignore the interfaces instead.
Fixes BMC#25979
---
src/device.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/src/device.c b/src/device.c
index fbfb2b5..2e0dbdc 100644
--- a/src/device.c
+++ b/src/device.c
@@ -1306,17 +1306,23 @@ connman_bool_t __connman_device_isfiltered(const char
*devname)
{
char **pattern;
char **blacklisted_interfaces;
+ gboolean match;
if (device_filter == NULL)
goto nodevice;
- for (pattern = device_filter; *pattern; pattern++) {
- if (g_pattern_match_simple(*pattern, devname) == FALSE) {
- DBG("ignoring device %s (match)", devname);
- return TRUE;
+ for (pattern = device_filter, match = FALSE; *pattern; pattern++) {
+ if (g_pattern_match_simple(*pattern, devname) == TRUE) {
+ match = TRUE;
+ break;
}
}
+ if (match == FALSE) {
+ DBG("ignoring device %s (match)", devname);
+ return TRUE;
+ }
+
nodevice:
if (g_pattern_match_simple("dummy*", devname) == TRUE) {
DBG("ignoring dummy networking devices");
--
1.7.11.4
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman