Commit 5ce21696 authored by Peter Meerwald-Stadler's avatar Peter Meerwald-Stadler Committed by Jussi Laakkonen

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
parent 45b5defc
...@@ -132,6 +132,7 @@ static void read_uevent(struct interface_data *interface) ...@@ -132,6 +132,7 @@ static void read_uevent(struct interface_data *interface)
if (ether_blacklisted(name)) { if (ether_blacklisted(name)) {
interface->service_type = CONNMAN_SERVICE_TYPE_UNKNOWN; interface->service_type = CONNMAN_SERVICE_TYPE_UNKNOWN;
interface->device_type = CONNMAN_DEVICE_TYPE_UNKNOWN; interface->device_type = CONNMAN_DEVICE_TYPE_UNKNOWN;
goto out;
} else { } else {
interface->service_type = CONNMAN_SERVICE_TYPE_ETHERNET; interface->service_type = CONNMAN_SERVICE_TYPE_ETHERNET;
interface->device_type = CONNMAN_DEVICE_TYPE_ETHERNET; interface->device_type = CONNMAN_DEVICE_TYPE_ETHERNET;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment