aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/skbuff.h
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2011-06-10 02:56:58 -0400
committerDavid S. Miller <davem@davemloft.net>2011-06-11 19:15:50 -0400
commit0b5c9db1b11d3175bb42b80663a9f072f801edf5 (patch)
tree555113c578a8c4372902512514f323128c494278 /include/linux/skbuff.h
parent06866bf5c5ad8989119a145fdb54a9fbcafa702d (diff)
vlan: Fix the ingress VLAN_FLAG_REORDER_HDR check
Testing of VLAN_FLAG_REORDER_HDR does not belong in vlan_untag but rather in vlan_do_receive. Otherwise the vlan header will not be properly put on the packet in the case of vlan header accelleration. As we remove the check from vlan_check_reorder_header rename it vlan_reorder_header to keep the naming clean. Fix up the skb->pkt_type early so we don't look at the packet after adding the vlan tag, which guarantees we don't goof and look at the wrong field. Use a simple if statement instead of a complicated switch statement to decided that we need to increment rx_stats for a multicast packet. Hopefully at somepoint we will just declare the case where VLAN_FLAG_REORDER_HDR is cleared as unsupported and remove the code. Until then this keeps it working correctly. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Jiri Pirko <jpirko@redhat.com> Acked-by: Changli Gao <xiaosuo@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r--include/linux/skbuff.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index e8b78ce14474..c0a4f3ab0cc0 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -1256,6 +1256,11 @@ static inline void skb_reserve(struct sk_buff *skb, int len)
1256 skb->tail += len; 1256 skb->tail += len;
1257} 1257}
1258 1258
1259static inline void skb_reset_mac_len(struct sk_buff *skb)
1260{
1261 skb->mac_len = skb->network_header - skb->mac_header;
1262}
1263
1259#ifdef NET_SKBUFF_DATA_USES_OFFSET 1264#ifdef NET_SKBUFF_DATA_USES_OFFSET
1260static inline unsigned char *skb_transport_header(const struct sk_buff *skb) 1265static inline unsigned char *skb_transport_header(const struct sk_buff *skb)
1261{ 1266{