Thread (4 messages) 4 messages, 3 authors, 2014-03-28

Re: [PATCH v2 net] net: Account for all vlan headers in skb_mac_gso_segment

From: David Miller <davem@davemloft.net>
Date: 2014-03-28 21:10:53

From: Vlad Yasevich <redacted>
Date: Thu, 27 Mar 2014 17:26:18 -0400
skb_network_protocol() already accounts for multiple vlan
headers that may be present in the skb.  However, skb_mac_gso_segment()
doesn't know anything about it and assumes that skb->mac_len
is set correctly to skip all mac headers.  That may not
always be the case.  If we are simply forwarding the packet (via
bridge or macvtap), all vlan headers may not be accounted for.

A simple solution is to allow skb_network_protocol to return
the vlan depth it has calculated.  This way skb_mac_gso_segment
will correctly skip all mac headers.

Signed-off-by: Vlad Yasevich <redacted>
---
Since v1:
 - Removed conditionals and used dummy variables as suggested by
   Eric Dumazet.
Applied, thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help