correct size in mac address comparison
authorjsg <jsg@openbsd.org>
Thu, 8 Feb 2024 00:05:46 +0000 (00:05 +0000)
committerjsg <jsg@openbsd.org>
Thu, 8 Feb 2024 00:05:46 +0000 (00:05 +0000)
found by "'(selbs->ni_macaddr)' too small (6 vs 32)" smatch error
ok stsp@ jca@ phessler@

sys/net80211/ieee80211_proto.c

index 7f8175d..3d8d649 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: ieee80211_proto.c,v 1.108 2022/03/14 15:07:24 stsp Exp $      */
+/*     $OpenBSD: ieee80211_proto.c,v 1.109 2024/02/08 00:05:46 jsg Exp $       */
 /*     $NetBSD: ieee80211_proto.c,v 1.8 2004/04/30 23:58:20 dyoung Exp $       */
 
 /*-
@@ -861,7 +861,7 @@ ieee80211_try_another_bss(struct ieee80211com *ic)
 
        /* Should not happen but seriously, don't try the same AP again. */
        if (memcmp(selbs->ni_macaddr, ic->ic_bss->ni_macaddr,
-           IEEE80211_NWID_LEN) == 0)
+           IEEE80211_ADDR_LEN) == 0)
                return;
 
        if (ifp->if_flags & IFF_DEBUG)