1 --- a/net80211/ieee80211_input.c
2 +++ b/net80211/ieee80211_input.c
3 @@ -1374,7 +1374,7 @@ ieee80211_auth_open(struct ieee80211_nod
4 vap->iv_stats.is_rx_bad_auth++; /* XXX maybe a unique error? */
5 if (vap->iv_opmode == IEEE80211_M_HOSTAP) {
6 if (ni == vap->iv_bss) {
7 - ni = ieee80211_dup_bss(vap, wh->i_addr2, 0);
8 + ni = ieee80211_dup_bss(vap, wh->i_addr2, 1);
12 @@ -1762,6 +1762,8 @@ ieee80211_ssid_mismatch(struct ieee80211
15 #define IEEE80211_VERIFY_SSID(_ni, _ssid) do { \
16 + if ((_ni)->ni_esslen == 0) \
18 if ((_ssid)[1] != 0 && \
19 ((_ssid)[1] != (_ni)->ni_esslen || \
20 memcmp((_ssid) + 2, (_ni)->ni_essid, (_ssid)[1]) != 0)) { \
21 @@ -1776,6 +1778,8 @@ ieee80211_ssid_mismatch(struct ieee80211
23 #else /* !IEEE80211_DEBUG */
24 #define IEEE80211_VERIFY_SSID(_ni, _ssid) do { \
25 + if ((_ni)->ni_esslen == 0) \
27 if ((_ssid)[1] != 0 && \
28 ((_ssid)[1] != (_ni)->ni_esslen || \
29 memcmp((_ssid) + 2, (_ni)->ni_essid, (_ssid)[1]) != 0)) { \