tunnels: harmonize cleanup done on skb on rx path
The goal of this patch is to harmonize cleanup done on a skbuff on rx path. Before this patch, behaviors were different depending of the tunnel type. Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
963a88b31d
commit
ea23192e8e
@@ -802,14 +802,12 @@ static int ip6_tnl_rcv(struct sk_buff *skb, __u16 protocol,
|
||||
rcu_read_unlock();
|
||||
goto discard;
|
||||
}
|
||||
secpath_reset(skb);
|
||||
skb->mac_header = skb->network_header;
|
||||
skb_reset_network_header(skb);
|
||||
skb->protocol = htons(protocol);
|
||||
skb->pkt_type = PACKET_HOST;
|
||||
memset(skb->cb, 0, sizeof(struct inet6_skb_parm));
|
||||
|
||||
__skb_tunnel_rx(skb, t->dev);
|
||||
__skb_tunnel_rx(skb, t->dev, t->net);
|
||||
|
||||
err = dscp_ecn_decapsulate(t, ipv6h, skb);
|
||||
if (unlikely(err)) {
|
||||
@@ -829,9 +827,6 @@ static int ip6_tnl_rcv(struct sk_buff *skb, __u16 protocol,
|
||||
tstats->rx_packets++;
|
||||
tstats->rx_bytes += skb->len;
|
||||
|
||||
if (!net_eq(t->net, dev_net(t->dev)))
|
||||
skb_scrub_packet(skb, true);
|
||||
|
||||
netif_rx(skb);
|
||||
|
||||
rcu_read_unlock();
|
||||
|
Reference in New Issue
Block a user