From: Roy Marples Date: Fri, 21 Jul 2023 14:41:03 +0000 (+0100) Subject: linux: fix wireless roaming X-Git-Tag: v10.0.3~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1e1268d2de92f148913fc08c1f6efb5b716ac5a1;p=thirdparty%2Fdhcpcd.git linux: fix wireless roaming Fixes #228. --- diff --git a/src/if-linux.c b/src/if-linux.c index 5e033a16..cb389536 100644 --- a/src/if-linux.c +++ b/src/if-linux.c @@ -553,12 +553,14 @@ bool if_roaming(struct interface *ifp) { -#ifdef IFF_LOWER_UP if (!ifp->wireless || - ifp->flags & IFF_RUNNING || - (ifp->flags & (IFF_UP | IFF_LOWER_UP)) != (IFF_UP | IFF_LOWER_UP)) + ifp->flags & IFF_RUNNING) return false; - return true; + +#if defined(IFF_DORMANT) + return ifp->flags & IFF_DORMANT; +#elif defined(IFF_LOWER_UP) + return (ifp->flags & (IFF_UP|IFF_LOWER_UP)) == (IFF_UP|IFF_LOWER_UP); #else return false; #endif