aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/ipip.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/ipip.c')
-rw-r--r--net/ipv4/ipip.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c
index 51fc2a1dcdd3..7f80fb4b82d3 100644
--- a/net/ipv4/ipip.c
+++ b/net/ipv4/ipip.c
@@ -190,15 +190,14 @@ static int ipip_rcv(struct sk_buff *skb)
190 struct ip_tunnel *tunnel; 190 struct ip_tunnel *tunnel;
191 const struct iphdr *iph; 191 const struct iphdr *iph;
192 192
193 if (iptunnel_pull_header(skb, 0, tpi.proto))
194 goto drop;
195
196 iph = ip_hdr(skb); 193 iph = ip_hdr(skb);
197 tunnel = ip_tunnel_lookup(itn, skb->dev->ifindex, TUNNEL_NO_KEY, 194 tunnel = ip_tunnel_lookup(itn, skb->dev->ifindex, TUNNEL_NO_KEY,
198 iph->saddr, iph->daddr, 0); 195 iph->saddr, iph->daddr, 0);
199 if (tunnel) { 196 if (tunnel) {
200 if (!xfrm4_policy_check(NULL, XFRM_POLICY_IN, skb)) 197 if (!xfrm4_policy_check(NULL, XFRM_POLICY_IN, skb))
201 goto drop; 198 goto drop;
199 if (iptunnel_pull_header(skb, 0, tpi.proto))
200 goto drop;
202 return ip_tunnel_rcv(tunnel, skb, &tpi, log_ecn_error); 201 return ip_tunnel_rcv(tunnel, skb, &tpi, log_ecn_error);
203 } 202 }
204 203
@@ -286,7 +285,6 @@ static void ipip_tunnel_setup(struct net_device *dev)
286 dev->flags = IFF_NOARP; 285 dev->flags = IFF_NOARP;
287 dev->iflink = 0; 286 dev->iflink = 0;
288 dev->addr_len = 4; 287 dev->addr_len = 4;
289 dev->features |= NETIF_F_NETNS_LOCAL;
290 dev->features |= NETIF_F_LLTX; 288 dev->features |= NETIF_F_LLTX;
291 dev->priv_flags &= ~IFF_XMIT_DST_RELEASE; 289 dev->priv_flags &= ~IFF_XMIT_DST_RELEASE;
292 290
@@ -437,7 +435,7 @@ static int __net_init ipip_init_net(struct net *net)
437static void __net_exit ipip_exit_net(struct net *net) 435static void __net_exit ipip_exit_net(struct net *net)
438{ 436{
439 struct ip_tunnel_net *itn = net_generic(net, ipip_net_id); 437 struct ip_tunnel_net *itn = net_generic(net, ipip_net_id);
440 ip_tunnel_delete_net(itn); 438 ip_tunnel_delete_net(itn, &ipip_link_ops);
441} 439}
442 440
443static struct pernet_operations ipip_net_ops = { 441static struct pernet_operations ipip_net_ops = {