public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] [PATCHv2 maint] batman-adv: fix VLAN Ethernet header access
@ 2013-05-09 14:16 Antonio Quartulli
  2013-05-09 16:07 ` Marek Lindner
  0 siblings, 1 reply; 5+ messages in thread
From: Antonio Quartulli @ 2013-05-09 14:16 UTC (permalink / raw)
  To: b.a.t.m.a.n; +Cc: Antonio Quartulli

From: Antonio Quartulli <antonio@open-mesh.com>

In interface_rx() skb->data cannot be directly used to
access the Ethernet header because it point to the batman
one.

Signed-off-by: Antonio Quartulli <antonio@open-mesh.com>
---

v2:
- use vlan_eth_hdr()

 soft-interface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/soft-interface.c b/soft-interface.c
index 6f20d33..114d10d 100644
--- a/soft-interface.c
+++ b/soft-interface.c
@@ -320,7 +320,7 @@ void batadv_interface_rx(struct net_device *soft_iface,
 
 	switch (ntohs(ethhdr->h_proto)) {
 	case ETH_P_8021Q:
-		vhdr = (struct vlan_ethhdr *)skb->data;
+		vhdr = vlan_eth_hdr(skb);
 		vid = ntohs(vhdr->h_vlan_TCI) & VLAN_VID_MASK;
 
 		if (vhdr->h_vlan_encapsulated_proto != ethertype)
-- 
1.8.1.5


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-05-10  6:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-09 14:16 [B.A.T.M.A.N.] [PATCHv2 maint] batman-adv: fix VLAN Ethernet header access Antonio Quartulli
2013-05-09 16:07 ` Marek Lindner
2013-05-09 16:44   ` Antonio Quartulli
2013-05-10  3:37     ` Marek Lindner
2013-05-10  6:16       ` Antonio Quartulli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox