From cd765a6594f05653652e4809ea2adce95ecb43b9 Mon Sep 17 00:00:00 2001 From: Jung-uk Kim Date: Wed, 5 Dec 2007 17:13:45 +0000 Subject: [PATCH] Teach dhclient(8) about net80211 link (association) status. Reviewed by: brooks MFC after: 3 days --- sbin/dhclient/dispatch.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sbin/dhclient/dispatch.c b/sbin/dhclient/dispatch.c index 2fec9136986d..02766e0280ea 100644 --- a/sbin/dhclient/dispatch.c +++ b/sbin/dhclient/dispatch.c @@ -329,6 +329,7 @@ interface_status(struct interface_info *ifinfo) if (ifmr.ifm_status & IFM_AVALID) { switch (ifmr.ifm_active & IFM_NMASK) { case IFM_ETHER: + case IFM_IEEE80211: if (ifmr.ifm_status & IFM_ACTIVE) goto active; else @@ -487,7 +488,9 @@ interface_link_status(char *ifname) close(sock); if (ifmr.ifm_status & IFM_AVALID) { - if ((ifmr.ifm_active & IFM_NMASK) == IFM_ETHER) { + switch (ifmr.ifm_active & IFM_NMASK) { + case IFM_ETHER: + case IFM_IEEE80211: if (ifmr.ifm_status & IFM_ACTIVE) return (1); else