mac80211: fix header ops
Johannes Berg
maintainerPATCH 1/1 mac80211: fix header ops
When using recvfrom() on a SOCK_DGRAM packet socket, I noticed that the MAC address passed back for wireless frames was always completely wrong. The reason for this is that the header parse function assigned to our virtual interfaces is a function parsing an 802.11 rather than 802.3 header. This patch fixes it by keeping the default ethernet header operations assigned.
---
I think this should go into 2.6.24. I have no idea what broke this or if it has been wrong forever... However, my eapol stuff relies on this fix.
There is one small problem with this: monitor interfaces are also set up with this function but have 802.11 frame type. I have found that to not matter but I'm not entirely sure. Does anybody think it does? In that case I'll have to (re-)assign this conditionally when changing the interface type.
net/mac80211/ieee80211.c | 1 - 1 file changed, 1 deletion(-)
net/mac80211/ieee80211.c +0 -1
@@ -449,7 +449,6 @@ static const struct header_ops ieee80211void ieee80211_if_setup (struct net_device *dev) {ether_setup (dev); - dev->header_ops = &ieee80211_header_ops; dev->hard_start_xmit = ieee80211_subif_start_xmit; dev->wireless_handlers = &ieee80211_iw_handler_def; dev->set_multicast_list = ieee80211_set_multicast_list;