ipv6: Fix sporadic sendmsg -EINVAL when sending to multicast groups.
[safe/jmp/linux-2.6] / net / ipv6 / tunnel6.c
index 23e2809..669f280 100644 (file)
@@ -87,9 +87,8 @@ int xfrm6_tunnel_deregister(struct xfrm6_tunnel *handler, unsigned short family)
 
 EXPORT_SYMBOL(xfrm6_tunnel_deregister);
 
-static int tunnel6_rcv(struct sk_buff **pskb)
+static int tunnel6_rcv(struct sk_buff *skb)
 {
-       struct sk_buff *skb = *pskb;
        struct xfrm6_tunnel *handler;
 
        if (!pskb_may_pull(skb, sizeof(struct ipv6hdr)))
@@ -106,12 +105,11 @@ drop:
        return 0;
 }
 
-static int tunnel46_rcv(struct sk_buff **pskb)
+static int tunnel46_rcv(struct sk_buff *skb)
 {
-       struct sk_buff *skb = *pskb;
        struct xfrm6_tunnel *handler;
 
-       if (!pskb_may_pull(skb, sizeof(struct ipv6hdr)))
+       if (!pskb_may_pull(skb, sizeof(struct iphdr)))
                goto drop;
 
        for (handler = tunnel46_handlers; handler; handler = handler->next)