core/dev: do not ignore dmac in dev_forward_skb()
authorAlexei Starovoitov <ast@plumgrid.com>
Tue, 12 Nov 2013 22:39:13 +0000 (14:39 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 14 Nov 2013 07:39:53 +0000 (02:39 -0500)
commit81b9eab5ebbf0d5d54da4fc168cfb02c2adc76b8
tree27470d9df44d0361aee2a5ce9f4e4420d166c6ac
parent52f48d0d9aaa621ffa5e08d79da99a3f8c93b848
core/dev: do not ignore dmac in dev_forward_skb()

commit 06a23fe31ca3
("core/dev: set pkt_type after eth_type_trans() in dev_forward_skb()")
and refactoring 64261f230a91
("dev: move skb_scrub_packet() after eth_type_trans()")

are forcing pkt_type to be PACKET_HOST when skb traverses veth.

which means that ip forwarding will kick in inside netns
even if skb->eth->h_dest != dev->dev_addr

Fix order of eth_type_trans() and skb_scrub_packet() in dev_forward_skb()
and in ip_tunnel_rcv()

Fixes: 06a23fe31ca3 ("core/dev: set pkt_type after eth_type_trans() in dev_forward_skb()")
CC: Isaku Yamahata <yamahatanetdev@gmail.com>
CC: Maciej Zenczykowski <zenczykowski@gmail.com>
CC: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/dev.c
net/ipv4/ip_tunnel.c