aboutsummaryrefslogtreecommitdiffstats
path: root/net/xfrm
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-02-22 21:44:31 -0500
committerDavid S. Miller <davem@davemloft.net>2011-02-22 21:44:31 -0500
commitdee9f4bceb5fd9dbfcc1567148fccdbf16d6a38a (patch)
tree4b88bec4650dbc539594ae5027d7a1e34c196c88 /net/xfrm
parent4ca2e685114c55e6777022a46849795d2aa1d31a (diff)
net: Make flow cache paths use a const struct flowi.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/xfrm')
-rw-r--r--net/xfrm/xfrm_policy.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index ef899a8e33ce..28c865adf609 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -954,7 +954,7 @@ __xfrm_policy_lookup(struct net *net, const struct flowi *fl, u16 family, u8 dir
954} 954}
955 955
956static struct flow_cache_object * 956static struct flow_cache_object *
957xfrm_policy_lookup(struct net *net, struct flowi *fl, u16 family, 957xfrm_policy_lookup(struct net *net, const struct flowi *fl, u16 family,
958 u8 dir, struct flow_cache_object *old_obj, void *ctx) 958 u8 dir, struct flow_cache_object *old_obj, void *ctx)
959{ 959{
960 struct xfrm_policy *pol; 960 struct xfrm_policy *pol;
@@ -990,7 +990,8 @@ static inline int policy_to_flow_dir(int dir)
990 } 990 }
991} 991}
992 992
993static struct xfrm_policy *xfrm_sk_policy_lookup(struct sock *sk, int dir, struct flowi *fl) 993static struct xfrm_policy *xfrm_sk_policy_lookup(struct sock *sk, int dir,
994 const struct flowi *fl)
994{ 995{
995 struct xfrm_policy *pol; 996 struct xfrm_policy *pol;
996 997
@@ -1629,7 +1630,7 @@ xfrm_resolve_and_create_bundle(struct xfrm_policy **pols, int num_pols,
1629} 1630}
1630 1631
1631static struct flow_cache_object * 1632static struct flow_cache_object *
1632xfrm_bundle_lookup(struct net *net, struct flowi *fl, u16 family, u8 dir, 1633xfrm_bundle_lookup(struct net *net, const struct flowi *fl, u16 family, u8 dir,
1633 struct flow_cache_object *oldflo, void *ctx) 1634 struct flow_cache_object *oldflo, void *ctx)
1634{ 1635{
1635 struct dst_entry *dst_orig = (struct dst_entry *)ctx; 1636 struct dst_entry *dst_orig = (struct dst_entry *)ctx;
@@ -1733,7 +1734,8 @@ error:
1733 * At the moment we eat a raw IP route. Mostly to speed up lookups 1734 * At the moment we eat a raw IP route. Mostly to speed up lookups
1734 * on interfaces with disabled IPsec. 1735 * on interfaces with disabled IPsec.
1735 */ 1736 */
1736int __xfrm_lookup(struct net *net, struct dst_entry **dst_p, struct flowi *fl, 1737int __xfrm_lookup(struct net *net, struct dst_entry **dst_p,
1738 const struct flowi *fl,
1737 struct sock *sk, int flags) 1739 struct sock *sk, int flags)
1738{ 1740{
1739 struct xfrm_policy *pols[XFRM_POLICY_TYPE_MAX]; 1741 struct xfrm_policy *pols[XFRM_POLICY_TYPE_MAX];
@@ -1889,7 +1891,8 @@ dropdst:
1889} 1891}
1890EXPORT_SYMBOL(__xfrm_lookup); 1892EXPORT_SYMBOL(__xfrm_lookup);
1891 1893
1892int xfrm_lookup(struct net *net, struct dst_entry **dst_p, struct flowi *fl, 1894int xfrm_lookup(struct net *net, struct dst_entry **dst_p,
1895 const struct flowi *fl,
1893 struct sock *sk, int flags) 1896 struct sock *sk, int flags)
1894{ 1897{
1895 int err = __xfrm_lookup(net, dst_p, fl, sk, flags); 1898 int err = __xfrm_lookup(net, dst_p, fl, sk, flags);