Message ID | 20130627052938.GD8524@valinux.co.jp |
---|---|
State | RFC, archived |
Delegated to: | David Miller |
Headers | show |
From: Isaku Yamahata <yamahata@valinux.co.jp> Date: Thu, 27 Jun 2013 14:29:38 +0900 > So you mean like this patch? The callers of dev_forward_skb() are > only veth, macvlan and l2tp, which seem fine with this change. Yes, it is what I was suggesting. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/core/dev.c b/net/core/dev.c index 722f633..b179b8a 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -1662,8 +1662,12 @@ int dev_forward_skb(struct net_device *dev, struct sk_buff *skb) skb->skb_iif = 0; skb_dst_drop(skb); skb->tstamp.tv64 = 0; - skb->pkt_type = PACKET_HOST; skb->protocol = eth_type_trans(skb, dev); + /* + * eth_type_trans() can set pkt_type. + * clear pkt_type _after_ calling eth_type_trans() + */ + skb->pkt_type = PACKET_HOST; skb->mark = 0; secpath_reset(skb); nf_reset(skb);