net: compat_mmsghdr must be used in sys_recvmmsg
[safe/jmp/linux-2.6] / net / ipv6 / ipcomp6.c
index 9566d8f..2f2a5ca 100644 (file)
@@ -51,7 +51,7 @@
 #include <linux/mutex.h>
 
 static void ipcomp6_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)
 {
        __be32 spi;
        struct ipv6hdr *iph = (struct ipv6hdr*)skb->data;
@@ -63,11 +63,11 @@ static void ipcomp6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
                return;
 
        spi = htonl(ntohs(ipcomph->cpi));
-       x = xfrm_state_lookup((xfrm_address_t *)&iph->daddr, spi, IPPROTO_COMP, AF_INET6);
+       x = xfrm_state_lookup(&init_net, (xfrm_address_t *)&iph->daddr, spi, IPPROTO_COMP, AF_INET6);
        if (!x)
                return;
 
-       printk(KERN_DEBUG "pmtu discovery on SA IPCOMP/%08x/%p6\n",
+       printk(KERN_DEBUG "pmtu discovery on SA IPCOMP/%08x/%pI6\n",
                        spi, &iph->daddr);
        xfrm_state_put(x);
 }
@@ -76,7 +76,7 @@ static struct xfrm_state *ipcomp6_tunnel_create(struct xfrm_state *x)
 {
        struct xfrm_state *t = NULL;
 
-       t = xfrm_state_alloc();
+       t = xfrm_state_alloc(&init_net);
        if (!t)
                goto out;
 
@@ -114,7 +114,7 @@ static int ipcomp6_tunnel_attach(struct xfrm_state *x)
 
        spi = xfrm6_tunnel_spi_lookup((xfrm_address_t *)&x->props.saddr);
        if (spi)
-               t = xfrm_state_lookup((xfrm_address_t *)&x->id.daddr,
+               t = xfrm_state_lookup(&init_net, (xfrm_address_t *)&x->id.daddr,
                                              spi, IPPROTO_IPV6, AF_INET6);
        if (!t) {
                t = ipcomp6_tunnel_create(x);
@@ -178,7 +178,7 @@ static const struct xfrm_type ipcomp6_type =
        .hdr_offset     = xfrm6_find_1stfragopt,
 };
 
-static struct inet6_protocol ipcomp6_protocol =
+static const struct inet6_protocol ipcomp6_protocol =
 {
        .handler        = xfrm6_rcv,
        .err_handler    = ipcomp6_err,