Merge branch 'linus' into cont_syslog
[safe/jmp/linux-2.6] / net / ipv6 / tunnel6.c
index 6323921..fc3c86a 100644 (file)
@@ -25,6 +25,7 @@
 #include <linux/mutex.h>
 #include <linux/netdevice.h>
 #include <linux/skbuff.h>
+#include <linux/slab.h>
 #include <net/ipv6.h>
 #include <net/protocol.h>
 #include <net/xfrm.h>
@@ -98,7 +99,7 @@ static int tunnel6_rcv(struct sk_buff *skb)
                if (!handler->handler(skb))
                        return 0;
 
-       icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_PORT_UNREACH, 0, skb->dev);
+       icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_PORT_UNREACH, 0);
 
 drop:
        kfree_skb(skb);
@@ -109,14 +110,14 @@ static int tunnel46_rcv(struct sk_buff *skb)
 {
        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)
                if (!handler->handler(skb))
                        return 0;
 
-       icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_PORT_UNREACH, 0, skb->dev);
+       icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_PORT_UNREACH, 0);
 
 drop:
        kfree_skb(skb);
@@ -124,7 +125,7 @@ drop:
 }
 
 static void tunnel6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
-                       int type, int code, int offset, __be32 info)
+                       u8 type, u8 code, int offset, __be32 info)
 {
        struct xfrm6_tunnel *handler;
 
@@ -133,13 +134,13 @@ static void tunnel6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
                        break;
 }
 
-static struct inet6_protocol tunnel6_protocol = {
+static const struct inet6_protocol tunnel6_protocol = {
        .handler        = tunnel6_rcv,
        .err_handler    = tunnel6_err,
        .flags          = INET6_PROTO_NOPOLICY|INET6_PROTO_FINAL,
 };
 
-static struct inet6_protocol tunnel46_protocol = {
+static const struct inet6_protocol tunnel46_protocol = {
        .handler        = tunnel46_rcv,
        .err_handler    = tunnel6_err,
        .flags          = INET6_PROTO_NOPOLICY|INET6_PROTO_FINAL,