]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Wireless must be down if unknown.
authorRoy Marples <roy@marples.name>
Tue, 6 Oct 2020 06:36:22 +0000 (07:36 +0100)
committerRoy Marples <roy@marples.name>
Tue, 6 Oct 2020 06:36:22 +0000 (07:36 +0100)
src/if.c

index 24d1f26665f293587e6e20d4a617e3ea36eef2b0..67586150bc0bea200cd29d6e9bda943b81894bf3 100644 (file)
--- a/src/if.c
+++ b/src/if.c
@@ -692,6 +692,12 @@ if_discover(struct dhcpcd_ctx *ctx, struct ifaddrs **ifaddrs,
 
                ifp->active = active;
                ifp->carrier = if_carrier(ifp, ifa->ifa_data);
+
+               /* Wireless devices must support carrier change,
+                * so treat UNKNOWN as down. */
+               if (ifp->wireless && ifp->carrier == LINK_UNKNOWN)
+                       ifp->carrier = LINK_DOWN;
+
                TAILQ_INSERT_TAIL(ifs, ifp, next);
        }