diff options
author | Nicolas Dichtel <nicolas.dichtel@6wind.com> | 2013-08-13 11:51:09 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-08-15 04:00:20 -0400 |
commit | 64261f230a9157f5f520ce30ec6827d679375e2f (patch) | |
tree | d081ea17ad44da140522604454670f93f9015135 /net/core | |
parent | fc4eba58b4c1462ff3d6247b66fb47d6928db6d2 (diff) |
dev: move skb_scrub_packet() after eth_type_trans()
skb_scrub_packet() was called before eth_type_trans() to let eth_type_trans()
set pkt_type.
In fact, we should force pkt_type to PACKET_HOST, so move the call after
eth_type_trans().
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/dev.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 58eb802584b9..1ed2b66a10a6 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -1691,13 +1691,13 @@ int dev_forward_skb(struct net_device *dev, struct sk_buff *skb) | |||
1691 | kfree_skb(skb); | 1691 | kfree_skb(skb); |
1692 | return NET_RX_DROP; | 1692 | return NET_RX_DROP; |
1693 | } | 1693 | } |
1694 | skb_scrub_packet(skb); | ||
1695 | skb->protocol = eth_type_trans(skb, dev); | 1694 | skb->protocol = eth_type_trans(skb, dev); |
1696 | 1695 | ||
1697 | /* eth_type_trans() can set pkt_type. | 1696 | /* eth_type_trans() can set pkt_type. |
1698 | * clear pkt_type _after_ calling eth_type_trans() | 1697 | * call skb_scrub_packet() after it to clear pkt_type _after_ calling |
1698 | * eth_type_trans(). | ||
1699 | */ | 1699 | */ |
1700 | skb->pkt_type = PACKET_HOST; | 1700 | skb_scrub_packet(skb); |
1701 | 1701 | ||
1702 | return netif_rx(skb); | 1702 | return netif_rx(skb); |
1703 | } | 1703 | } |