netns xfrm: lookup in netns
Pass netns to xfrm_lookup()/__xfrm_lookup(). For that pass netns to flow_cache_lookup() and resolver callback. Take it from socket or netdevice. Stub DECnet to init_net. 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
cdcbca7c1f
commit
52479b623d
@@ -66,7 +66,7 @@ int ip_route_me_harder(struct sk_buff *skb, unsigned addr_type)
|
||||
#ifdef CONFIG_XFRM
|
||||
if (!(IPCB(skb)->flags & IPSKB_XFRM_TRANSFORMED) &&
|
||||
xfrm_decode_session(skb, &fl, AF_INET) == 0)
|
||||
if (xfrm_lookup(&skb->dst, &fl, skb->sk, 0))
|
||||
if (xfrm_lookup(net, &skb->dst, &fl, skb->sk, 0))
|
||||
return -1;
|
||||
#endif
|
||||
|
||||
@@ -97,7 +97,7 @@ int ip_xfrm_me_harder(struct sk_buff *skb)
|
||||
dst = ((struct xfrm_dst *)dst)->route;
|
||||
dst_hold(dst);
|
||||
|
||||
if (xfrm_lookup(&dst, &fl, skb->sk, 0) < 0)
|
||||
if (xfrm_lookup(dev_net(dst->dev), &dst, &fl, skb->sk, 0) < 0)
|
||||
return -1;
|
||||
|
||||
dst_release(skb->dst);
|
||||
|
Reference in New Issue
Block a user