From 5ce21696436ddf81743f173469b2e8f85adaf64c Mon Sep 17 00:00:00 2001 From: Peter Meerwald-Stadler Date: Sat, 9 Jun 2018 19:19:18 +0200 Subject: [PATCH] rtnl: Bail out if interface name is blacklisted read_uevent() checks if the interface name is blacklisted, but then continues to open the corresponding uevent file, and happily sets SERIVCE_TYPE and DEVICE_TYPE (nullifying the blacklisting) this leads to the following logging when starting connmand -I wlan0 Ignoring interface wlan0 (filtered) Adding interface wlan0 [ wifi ] fix this by bailing out from read_uevent() as soon as we find the device is blacklisted --- connman/src/rtnl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/connman/src/rtnl.c b/connman/src/rtnl.c index 95d59d0..7a0473e 100644 --- a/connman/src/rtnl.c +++ b/connman/src/rtnl.c @@ -132,6 +132,7 @@ static void read_uevent(struct interface_data *interface) if (ether_blacklisted(name)) { interface->service_type = CONNMAN_SERVICE_TYPE_UNKNOWN; interface->device_type = CONNMAN_DEVICE_TYPE_UNKNOWN; + goto out; } else { interface->service_type = CONNMAN_SERVICE_TYPE_ETHERNET; interface->device_type = CONNMAN_DEVICE_TYPE_ETHERNET; -- 2.23.0