aboutsummaryrefslogtreecommitdiffstats
path: root/net/xfrm/xfrm_policy.c
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2008-11-25 20:51:25 -0500
committerDavid S. Miller <davem@davemloft.net>2008-11-25 20:51:25 -0500
commitc5b3cf46eabe6e7459125fc6e2033b4222665017 (patch)
treea968ad567906d7b45270b9e91d534493f8a1a38d /net/xfrm/xfrm_policy.c
parentdb983c1144884cab10d6397532f4bf05eb0c01d2 (diff)
netns xfrm: ->dst_lookup in netns
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/xfrm/xfrm_policy.c')
-rw-r--r--net/xfrm/xfrm_policy.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index 7ebbdd63fca0..2b0a80b6259b 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -92,7 +92,7 @@ int xfrm_selector_match(struct xfrm_selector *sel, struct flowi *fl,
92 return 0; 92 return 0;
93} 93}
94 94
95static inline struct dst_entry *__xfrm_dst_lookup(int tos, 95static inline struct dst_entry *__xfrm_dst_lookup(struct net *net, int tos,
96 xfrm_address_t *saddr, 96 xfrm_address_t *saddr,
97 xfrm_address_t *daddr, 97 xfrm_address_t *daddr,
98 int family) 98 int family)
@@ -104,7 +104,7 @@ static inline struct dst_entry *__xfrm_dst_lookup(int tos,
104 if (unlikely(afinfo == NULL)) 104 if (unlikely(afinfo == NULL))
105 return ERR_PTR(-EAFNOSUPPORT); 105 return ERR_PTR(-EAFNOSUPPORT);
106 106
107 dst = afinfo->dst_lookup(tos, saddr, daddr); 107 dst = afinfo->dst_lookup(net, tos, saddr, daddr);
108 108
109 xfrm_policy_put_afinfo(afinfo); 109 xfrm_policy_put_afinfo(afinfo);
110 110
@@ -116,6 +116,7 @@ static inline struct dst_entry *xfrm_dst_lookup(struct xfrm_state *x, int tos,
116 xfrm_address_t *prev_daddr, 116 xfrm_address_t *prev_daddr,
117 int family) 117 int family)
118{ 118{
119 struct net *net = xs_net(x);
119 xfrm_address_t *saddr = &x->props.saddr; 120 xfrm_address_t *saddr = &x->props.saddr;
120 xfrm_address_t *daddr = &x->id.daddr; 121 xfrm_address_t *daddr = &x->id.daddr;
121 struct dst_entry *dst; 122 struct dst_entry *dst;
@@ -129,7 +130,7 @@ static inline struct dst_entry *xfrm_dst_lookup(struct xfrm_state *x, int tos,
129 daddr = x->coaddr; 130 daddr = x->coaddr;
130 } 131 }
131 132
132 dst = __xfrm_dst_lookup(tos, saddr, daddr, family); 133 dst = __xfrm_dst_lookup(net, tos, saddr, daddr, family);
133 134
134 if (!IS_ERR(dst)) { 135 if (!IS_ERR(dst)) {
135 if (prev_saddr != saddr) 136 if (prev_saddr != saddr)