ipv6: remove unneeded check to pskb_may_pull in ipip6_rcv
authorHannes Frederic Sowa <hannes@stressinduktion.org>
Fri, 18 Jan 2013 09:18:17 +0000 (09:18 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 18 Jan 2013 19:43:51 +0000 (14:43 -0500)
This is already checked by the caller (tunnel64_rcv) and brings ipip6_rcv
in line with ipip_rcv.

Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/sit.c

index cfba99b..98fe536 100644 (file)
@@ -592,15 +592,10 @@ out:
 
 static int ipip6_rcv(struct sk_buff *skb)
 {
-       const struct iphdr *iph;
+       const struct iphdr *iph = ip_hdr(skb);
        struct ip_tunnel *tunnel;
        int err;
 
-       if (!pskb_may_pull(skb, sizeof(struct ipv6hdr)))
-               goto out;
-
-       iph = ip_hdr(skb);
-
        tunnel = ipip6_tunnel_lookup(dev_net(skb->dev), skb->dev,
                                     iph->saddr, iph->daddr);
        if (tunnel != NULL) {