Lines 757-763
hostap_input(struct ieee80211_node *ni, struct mbuf *m,
Link Here
|
757 |
IEEE80211_NODE_STAT(ni, rx_decap); |
757 |
IEEE80211_NODE_STAT(ni, rx_decap); |
758 |
goto err; |
758 |
goto err; |
759 |
} |
759 |
} |
760 |
eh = mtod(m, struct ether_header *); |
760 |
if (!(qos & IEEE80211_QOS_AMSDU)) |
|
|
761 |
eh = mtod(m, struct ether_header *); |
761 |
if (!ieee80211_node_is_authorized(ni)) { |
762 |
if (!ieee80211_node_is_authorized(ni)) { |
762 |
/* |
763 |
/* |
763 |
* Deny any non-PAE frames received prior to |
764 |
* Deny any non-PAE frames received prior to |
Lines 767-777
hostap_input(struct ieee80211_node *ni, struct mbuf *m,
Link Here
|
767 |
* the port is not marked authorized by the |
768 |
* the port is not marked authorized by the |
768 |
* authenticator until the handshake has completed. |
769 |
* authenticator until the handshake has completed. |
769 |
*/ |
770 |
*/ |
770 |
if (eh->ether_type != htons(ETHERTYPE_PAE)) { |
771 |
if (eh == NULL || |
|
|
772 |
eh->ether_type != htons(ETHERTYPE_PAE)) { |
771 |
IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_INPUT, |
773 |
IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_INPUT, |
772 |
eh->ether_shost, "data", |
774 |
ni->ni_macaddr, "data", |
773 |
"unauthorized port: ether type 0x%x len %u", |
775 |
"unauthorized or unknown port: ether type 0x%x len %u", |
774 |
eh->ether_type, m->m_pkthdr.len); |
776 |
eh == NULL ? -1 : eh->ether_type, |
|
|
777 |
m->m_pkthdr.len); |
775 |
vap->iv_stats.is_rx_unauth++; |
778 |
vap->iv_stats.is_rx_unauth++; |
776 |
IEEE80211_NODE_STAT(ni, rx_unauth); |
779 |
IEEE80211_NODE_STAT(ni, rx_unauth); |
777 |
goto err; |
780 |
goto err; |
Lines 784-790
hostap_input(struct ieee80211_node *ni, struct mbuf *m,
Link Here
|
784 |
if ((vap->iv_flags & IEEE80211_F_DROPUNENC) && |
787 |
if ((vap->iv_flags & IEEE80211_F_DROPUNENC) && |
785 |
((has_decrypted == 0) && (m->m_flags & M_WEP) == 0) && |
788 |
((has_decrypted == 0) && (m->m_flags & M_WEP) == 0) && |
786 |
(is_hw_decrypted == 0) && |
789 |
(is_hw_decrypted == 0) && |
787 |
eh->ether_type != htons(ETHERTYPE_PAE)) { |
790 |
(eh == NULL || |
|
|
791 |
eh->ether_type != htons(ETHERTYPE_PAE))) { |
788 |
/* |
792 |
/* |
789 |
* Drop unencrypted frames. |
793 |
* Drop unencrypted frames. |
790 |
*/ |
794 |
*/ |