Browse Source

interface: do not force link-ext hotplug interfaces to present by default

On wireless interfaces, hostapd can sometimes defer the bringup of secondary
virtual interfaces until autochannel or coex scan completes.
Do not force the present state in that case in order to avoid attempting
to bring up the device before it is ready

Signed-off-by: Felix Fietkau <nbd@nbd.name>
Felix Fietkau 3 years ago
parent
commit
5e18d5b9cc
1 changed files with 2 additions and 1 deletions
  1. 2 1
      interface.c

+ 2 - 1
interface.c

@@ -1081,7 +1081,8 @@ interface_handle_link(struct interface *iface, const char *name,
 
 	if (add) {
 		interface_set_device_config(iface, dev);
-		device_set_present(dev, true);
+		if (!link_ext)
+			device_set_present(dev, true);
 
 		ret = interface_add_link(iface, dev, vlan, link_ext);
 	} else {