]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - net/ipv6/ipcomp6.c
netns xfrm: xfrm6_tunnel in netns
[mirror_ubuntu-bionic-kernel.git] / net / ipv6 / ipcomp6.c
index 2f2a5ca2c8786599560f7328d64401f837ab5e38..1d1faf757c9a7aad7e39be7bb759a3145303d25f 100644 (file)
@@ -81,7 +81,7 @@ static struct xfrm_state *ipcomp6_tunnel_create(struct xfrm_state *x)
                goto out;
 
        t->id.proto = IPPROTO_IPV6;
-       t->id.spi = xfrm6_tunnel_alloc_spi((xfrm_address_t *)&x->props.saddr);
+       t->id.spi = xfrm6_tunnel_alloc_spi(&init_net, (xfrm_address_t *)&x->props.saddr);
        if (!t->id.spi)
                goto error;
 
@@ -112,7 +112,7 @@ static int ipcomp6_tunnel_attach(struct xfrm_state *x)
        struct xfrm_state *t = NULL;
        __be32 spi;
 
-       spi = xfrm6_tunnel_spi_lookup((xfrm_address_t *)&x->props.saddr);
+       spi = xfrm6_tunnel_spi_lookup(&init_net, (xfrm_address_t *)&x->props.saddr);
        if (spi)
                t = xfrm_state_lookup(&init_net, (xfrm_address_t *)&x->id.daddr,
                                              spi, IPPROTO_IPV6, AF_INET6);