- 论坛徽章:
- 0
|
- linux-2.6.18.3/net/ieee80211/ieee80211_rx.c
- int ieee80211_rx (struct ieee80211_device * ieee,
- struct sk_buff * skb,
- struct ieee80211_rx_stats * rx_stats)
- {
- ......
- hdr = (struct ieee80211_hdr_4addr *)skb->data;
- if (crypt && !(fc & IEEE80211_FCTL_PROTECTED) && !ieee->open_wep) {
- if (/*ieee->ieee802_1x && */
- ieee80211_is_eapol_frame(ieee, skb)) {
- /* pass unencrypted EAPOL frames even if encryption is
- * configured */
- } else {
- IEEE80211_DEBUG_DROP("encryption configured, but RX "
- "frame not encrypted (SA=" MAC_FMT
- ")\n", MAC_ARG(hdr->addr2));
- goto rx_dropped;
- }
- }
- // almost 2 same if block #####
- if (crypt && !(fc & IEEE80211_FCTL_PROTECTED) && !ieee->open_wep &&
- !ieee80211_is_eapol_frame(ieee, skb)) {
- IEEE80211_DEBUG_DROP("dropped unencrypted RX data "
- "frame from " MAC_FMT
- " (drop_unencrypted=1)\n",
- MAC_ARG(hdr->addr2));
- goto rx_dropped;
- }
- ......
- }
复制代码 |
|