aboutsummaryrefslogtreecommitdiffstats
path: root/net/xfrm/xfrm_policy.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-03-12 00:29:39 -0500
committerDavid S. Miller <davem@davemloft.net>2011-03-12 18:08:44 -0500
commit1d28f42c1bd4bb2363d88df74d0128b4da135b4a (patch)
treecb2e652fe79a2bc307e871bc2d3fa51cc8051e45 /net/xfrm/xfrm_policy.c
parentca116922afa8cc5ad46b00c0a637b1cde5ca478a (diff)
net: Put flowi_* prefix on AF independent members of struct flowi
I intend to turn struct flowi into a union of AF specific flowi structs. There will be a common structure that each variant includes first, much like struct sock_common. This is the first step to move in that direction. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/xfrm/xfrm_policy.c')
-rw-r--r--net/xfrm/xfrm_policy.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index 9e4aacda26cc..dd6243f9d933 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -63,8 +63,8 @@ __xfrm4_selector_match(const struct xfrm_selector *sel, const struct flowi *fl)
63 addr_match(&fl->fl4_src, &sel->saddr, sel->prefixlen_s) && 63 addr_match(&fl->fl4_src, &sel->saddr, sel->prefixlen_s) &&
64 !((xfrm_flowi_dport(fl) ^ sel->dport) & sel->dport_mask) && 64 !((xfrm_flowi_dport(fl) ^ sel->dport) & sel->dport_mask) &&
65 !((xfrm_flowi_sport(fl) ^ sel->sport) & sel->sport_mask) && 65 !((xfrm_flowi_sport(fl) ^ sel->sport) & sel->sport_mask) &&
66 (fl->proto == sel->proto || !sel->proto) && 66 (fl->flowi_proto == sel->proto || !sel->proto) &&
67 (fl->oif == sel->ifindex || !sel->ifindex); 67 (fl->flowi_oif == sel->ifindex || !sel->ifindex);
68} 68}
69 69
70static inline int 70static inline int
@@ -74,8 +74,8 @@ __xfrm6_selector_match(const struct xfrm_selector *sel, const struct flowi *fl)
74 addr_match(&fl->fl6_src, &sel->saddr, sel->prefixlen_s) && 74 addr_match(&fl->fl6_src, &sel->saddr, sel->prefixlen_s) &&
75 !((xfrm_flowi_dport(fl) ^ sel->dport) & sel->dport_mask) && 75 !((xfrm_flowi_dport(fl) ^ sel->dport) & sel->dport_mask) &&
76 !((xfrm_flowi_sport(fl) ^ sel->sport) & sel->sport_mask) && 76 !((xfrm_flowi_sport(fl) ^ sel->sport) & sel->sport_mask) &&
77 (fl->proto == sel->proto || !sel->proto) && 77 (fl->flowi_proto == sel->proto || !sel->proto) &&
78 (fl->oif == sel->ifindex || !sel->ifindex); 78 (fl->flowi_oif == sel->ifindex || !sel->ifindex);
79} 79}
80 80
81int xfrm_selector_match(const struct xfrm_selector *sel, const struct flowi *fl, 81int xfrm_selector_match(const struct xfrm_selector *sel, const struct flowi *fl,
@@ -876,13 +876,13 @@ static int xfrm_policy_match(const struct xfrm_policy *pol,
876 int match, ret = -ESRCH; 876 int match, ret = -ESRCH;
877 877
878 if (pol->family != family || 878 if (pol->family != family ||
879 (fl->mark & pol->mark.m) != pol->mark.v || 879 (fl->flowi_mark & pol->mark.m) != pol->mark.v ||
880 pol->type != type) 880 pol->type != type)
881 return ret; 881 return ret;
882 882
883 match = xfrm_selector_match(sel, fl, family); 883 match = xfrm_selector_match(sel, fl, family);
884 if (match) 884 if (match)
885 ret = security_xfrm_policy_lookup(pol->security, fl->secid, 885 ret = security_xfrm_policy_lookup(pol->security, fl->flowi_secid,
886 dir); 886 dir);
887 887
888 return ret; 888 return ret;
@@ -1012,7 +1012,7 @@ static struct xfrm_policy *xfrm_sk_policy_lookup(struct sock *sk, int dir,
1012 goto out; 1012 goto out;
1013 } 1013 }
1014 err = security_xfrm_policy_lookup(pol->security, 1014 err = security_xfrm_policy_lookup(pol->security,
1015 fl->secid, 1015 fl->flowi_secid,
1016 policy_to_flow_dir(dir)); 1016 policy_to_flow_dir(dir));
1017 if (!err) 1017 if (!err)
1018 xfrm_pol_hold(pol); 1018 xfrm_pol_hold(pol);
@@ -1848,7 +1848,7 @@ restart:
1848 1848
1849 return make_blackhole(net, family, dst_orig); 1849 return make_blackhole(net, family, dst_orig);
1850 } 1850 }
1851 if (fl->flags & FLOWI_FLAG_CAN_SLEEP) { 1851 if (fl->flowi_flags & FLOWI_FLAG_CAN_SLEEP) {
1852 DECLARE_WAITQUEUE(wait, current); 1852 DECLARE_WAITQUEUE(wait, current);
1853 1853
1854 add_wait_queue(&net->xfrm.km_waitq, &wait); 1854 add_wait_queue(&net->xfrm.km_waitq, &wait);
@@ -1990,7 +1990,7 @@ int __xfrm_decode_session(struct sk_buff *skb, struct flowi *fl,
1990 return -EAFNOSUPPORT; 1990 return -EAFNOSUPPORT;
1991 1991
1992 afinfo->decode_session(skb, fl, reverse); 1992 afinfo->decode_session(skb, fl, reverse);
1993 err = security_xfrm_decode_session(skb, &fl->secid); 1993 err = security_xfrm_decode_session(skb, &fl->flowi_secid);
1994 xfrm_policy_put_afinfo(afinfo); 1994 xfrm_policy_put_afinfo(afinfo);
1995 return err; 1995 return err;
1996} 1996}