aboutsummaryrefslogtreecommitdiffstats
path: root/net/xfrm
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-03-11 15:59:31 -0500
committerDavid S. Miller <davem@davemloft.net>2011-03-12 18:08:43 -0500
commitca116922afa8cc5ad46b00c0a637b1cde5ca478a (patch)
treed42c44ec4153750e40ee509046af9030c6621eb8 /net/xfrm
parentfbef0a40919a80eb8a02fe9d3b96dfdcdebf4317 (diff)
xfrm: Eliminate "fl" and "pol" args to xfrm_bundle_ok().
There is only one caller of xfrm_bundle_ok(), and that always passes these parameters as NULL. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/xfrm')
-rw-r--r--net/xfrm/xfrm_policy.c22
1 files changed, 3 insertions, 19 deletions
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index b1932a629ef8..9e4aacda26cc 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -50,8 +50,7 @@ static struct xfrm_policy_afinfo *xfrm_policy_get_afinfo(unsigned short family);
50static void xfrm_policy_put_afinfo(struct xfrm_policy_afinfo *afinfo); 50static void xfrm_policy_put_afinfo(struct xfrm_policy_afinfo *afinfo);
51static void xfrm_init_pmtu(struct dst_entry *dst); 51static void xfrm_init_pmtu(struct dst_entry *dst);
52static int stale_bundle(struct dst_entry *dst); 52static int stale_bundle(struct dst_entry *dst);
53static int xfrm_bundle_ok(struct xfrm_policy *pol, struct xfrm_dst *xdst, 53static int xfrm_bundle_ok(struct xfrm_dst *xdst, int family);
54 const struct flowi *fl, int family);
55 54
56 55
57static struct xfrm_policy *__xfrm_policy_unlink(struct xfrm_policy *pol, 56static struct xfrm_policy *__xfrm_policy_unlink(struct xfrm_policy *pol,
@@ -2223,7 +2222,7 @@ static struct dst_entry *xfrm_dst_check(struct dst_entry *dst, u32 cookie)
2223 2222
2224static int stale_bundle(struct dst_entry *dst) 2223static int stale_bundle(struct dst_entry *dst)
2225{ 2224{
2226 return !xfrm_bundle_ok(NULL, (struct xfrm_dst *)dst, NULL, AF_UNSPEC); 2225 return !xfrm_bundle_ok((struct xfrm_dst *)dst, AF_UNSPEC);
2227} 2226}
2228 2227
2229void xfrm_dst_ifdown(struct dst_entry *dst, struct net_device *dev) 2228void xfrm_dst_ifdown(struct dst_entry *dst, struct net_device *dev)
@@ -2295,8 +2294,7 @@ static void xfrm_init_pmtu(struct dst_entry *dst)
2295 * still valid. 2294 * still valid.
2296 */ 2295 */
2297 2296
2298static int xfrm_bundle_ok(struct xfrm_policy *pol, struct xfrm_dst *first, 2297static int xfrm_bundle_ok(struct xfrm_dst *first, int family)
2299 const struct flowi *fl, int family)
2300{ 2298{
2301 struct dst_entry *dst = &first->u.dst; 2299 struct dst_entry *dst = &first->u.dst;
2302 struct xfrm_dst *last; 2300 struct xfrm_dst *last;
@@ -2305,26 +2303,12 @@ static int xfrm_bundle_ok(struct xfrm_policy *pol, struct xfrm_dst *first,
2305 if (!dst_check(dst->path, ((struct xfrm_dst *)dst)->path_cookie) || 2303 if (!dst_check(dst->path, ((struct xfrm_dst *)dst)->path_cookie) ||
2306 (dst->dev && !netif_running(dst->dev))) 2304 (dst->dev && !netif_running(dst->dev)))
2307 return 0; 2305 return 0;
2308#ifdef CONFIG_XFRM_SUB_POLICY
2309 if (fl) {
2310 if (first->origin && !flow_cache_uli_match(first->origin, fl))
2311 return 0;
2312 if (first->partner &&
2313 !xfrm_selector_match(first->partner, fl, family))
2314 return 0;
2315 }
2316#endif
2317 2306
2318 last = NULL; 2307 last = NULL;
2319 2308
2320 do { 2309 do {
2321 struct xfrm_dst *xdst = (struct xfrm_dst *)dst; 2310 struct xfrm_dst *xdst = (struct xfrm_dst *)dst;
2322 2311
2323 if (fl && !xfrm_selector_match(&dst->xfrm->sel, fl, family))
2324 return 0;
2325 if (fl && pol &&
2326 !security_xfrm_state_pol_flow_match(dst->xfrm, pol, fl))
2327 return 0;
2328 if (dst->xfrm->km.state != XFRM_STATE_VALID) 2312 if (dst->xfrm->km.state != XFRM_STATE_VALID)
2329 return 0; 2313 return 0;
2330 if (xdst->xfrm_genid != dst->xfrm->genid) 2314 if (xdst->xfrm_genid != dst->xfrm->genid)