aboutsummaryrefslogtreecommitdiffstats
path: root/net/xfrm/xfrm_policy.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/xfrm/xfrm_policy.c')
-rw-r--r--net/xfrm/xfrm_policy.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index dd6243f9d933..d54b6e7165c6 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -61,8 +61,8 @@ __xfrm4_selector_match(const struct xfrm_selector *sel, const struct flowi *fl)
61{ 61{
62 return addr_match(&fl->fl4_dst, &sel->daddr, sel->prefixlen_d) && 62 return addr_match(&fl->fl4_dst, &sel->daddr, sel->prefixlen_d) &&
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, &fl->uli_u) ^ sel->dport) & sel->dport_mask) &&
65 !((xfrm_flowi_sport(fl) ^ sel->sport) & sel->sport_mask) && 65 !((xfrm_flowi_sport(fl, &fl->uli_u) ^ sel->sport) & sel->sport_mask) &&
66 (fl->flowi_proto == sel->proto || !sel->proto) && 66 (fl->flowi_proto == sel->proto || !sel->proto) &&
67 (fl->flowi_oif == sel->ifindex || !sel->ifindex); 67 (fl->flowi_oif == sel->ifindex || !sel->ifindex);
68} 68}
@@ -72,8 +72,8 @@ __xfrm6_selector_match(const struct xfrm_selector *sel, const struct flowi *fl)
72{ 72{
73 return addr_match(&fl->fl6_dst, &sel->daddr, sel->prefixlen_d) && 73 return addr_match(&fl->fl6_dst, &sel->daddr, sel->prefixlen_d) &&
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, &fl->uli_u) ^ sel->dport) & sel->dport_mask) &&
76 !((xfrm_flowi_sport(fl) ^ sel->sport) & sel->sport_mask) && 76 !((xfrm_flowi_sport(fl, &fl->uli_u) ^ sel->sport) & sel->sport_mask) &&
77 (fl->flowi_proto == sel->proto || !sel->proto) && 77 (fl->flowi_proto == sel->proto || !sel->proto) &&
78 (fl->flowi_oif == sel->ifindex || !sel->ifindex); 78 (fl->flowi_oif == sel->ifindex || !sel->ifindex);
79} 79}