netns xfrm: state lookup in netns
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
0e6024519b
commit
221df1ed33
@ -415,7 +415,7 @@ static void ah6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
|
||||
type != ICMPV6_PKT_TOOBIG)
|
||||
return;
|
||||
|
||||
x = xfrm_state_lookup((xfrm_address_t *)&iph->daddr, ah->spi, IPPROTO_AH, AF_INET6);
|
||||
x = xfrm_state_lookup(&init_net, (xfrm_address_t *)&iph->daddr, ah->spi, IPPROTO_AH, AF_INET6);
|
||||
if (!x)
|
||||
return;
|
||||
|
||||
|
@ -364,7 +364,7 @@ static void esp6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
|
||||
type != ICMPV6_PKT_TOOBIG)
|
||||
return;
|
||||
|
||||
x = xfrm_state_lookup((xfrm_address_t *)&iph->daddr, esph->spi, IPPROTO_ESP, AF_INET6);
|
||||
x = xfrm_state_lookup(&init_net, (xfrm_address_t *)&iph->daddr, esph->spi, IPPROTO_ESP, AF_INET6);
|
||||
if (!x)
|
||||
return;
|
||||
printk(KERN_DEBUG "pmtu discovery on SA ESP/%08x/%pI6\n",
|
||||
|
@ -63,7 +63,7 @@ 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;
|
||||
|
||||
@ -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);
|
||||
|
@ -100,7 +100,7 @@ int xfrm6_input_addr(struct sk_buff *skb, xfrm_address_t *daddr,
|
||||
break;
|
||||
}
|
||||
|
||||
x = xfrm_state_lookup_byaddr(dst, src, proto, AF_INET6);
|
||||
x = xfrm_state_lookup_byaddr(&init_net, dst, src, proto, AF_INET6);
|
||||
if (!x)
|
||||
continue;
|
||||
|
||||
|
Reference in New Issue
Block a user