mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
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:
parent
0e6024519b
commit
221df1ed33
12 changed files with 38 additions and 34 deletions
|
@ -35,7 +35,7 @@ static void ipcomp4_err(struct sk_buff *skb, u32 info)
|
|||
return;
|
||||
|
||||
spi = htonl(ntohs(ipch->cpi));
|
||||
x = xfrm_state_lookup((xfrm_address_t *)&iph->daddr,
|
||||
x = xfrm_state_lookup(&init_net, (xfrm_address_t *)&iph->daddr,
|
||||
spi, IPPROTO_COMP, AF_INET);
|
||||
if (!x)
|
||||
return;
|
||||
|
@ -85,7 +85,7 @@ static int ipcomp_tunnel_attach(struct xfrm_state *x)
|
|||
int err = 0;
|
||||
struct xfrm_state *t;
|
||||
|
||||
t = xfrm_state_lookup((xfrm_address_t *)&x->id.daddr.a4,
|
||||
t = xfrm_state_lookup(&init_net, (xfrm_address_t *)&x->id.daddr.a4,
|
||||
x->props.saddr.a4, IPPROTO_IPIP, AF_INET);
|
||||
if (!t) {
|
||||
t = ipcomp_tunnel_create(x);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue