* [PATCH] mac80211: fix header ops
@ 2007-12-12 15:31 Johannes Berg
0 siblings, 0 replies; only message in thread
From: Johannes Berg @ 2007-12-12 15:31 UTC (permalink / raw)
To: John Linville
Cc: Michael Wu, linux-wireless, Jouni Malinen, Stephen Hemminger
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.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
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(-)
--- everything.orig/net/mac80211/ieee80211.c 2007-12-12 16:24:31.929129394 +0100
+++ everything/net/mac80211/ieee80211.c 2007-12-12 16:25:23.609131835 +0100
@@ -449,7 +449,6 @@ static const struct header_ops ieee80211
void 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;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-12-12 17:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-12 15:31 [PATCH] mac80211: fix header ops Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox