]> Pileus Git - ~andy/linux/blobdiff - net/ipv6/sit.c
ip_tunnel: push generic protocol handling to ip_tunnel module.
[~andy/linux] / net / ipv6 / sit.c
index 76bb8de435b25064359f6acbcc15d26750c4fd53..6cee844678e2418c2fefc84ddbfd9c34584ea613 100644 (file)
@@ -640,9 +640,14 @@ static const struct tnl_ptk_info tpi = {
 
 static int ipip_rcv(struct sk_buff *skb)
 {
-       const struct iphdr *iph = ip_hdr(skb);
+       const struct iphdr *iph;
        struct ip_tunnel *tunnel;
 
+       if (iptunnel_pull_header(skb, 0, tpi.proto))
+               goto drop;
+
+       iph = ip_hdr(skb);
+
        tunnel = ipip6_tunnel_lookup(dev_net(skb->dev), skb->dev,
                                     iph->saddr, iph->daddr);
        if (tunnel != NULL) {