Commit 200ce96e authored by David S. Miller's avatar David S. Miller

xfrm: Const'ify selector argument to xfrm_selector_match()

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 19bd6244
...@@ -845,7 +845,7 @@ __be16 xfrm_flowi_dport(const struct flowi *fl) ...@@ -845,7 +845,7 @@ __be16 xfrm_flowi_dport(const struct flowi *fl)
return port; return port;
} }
extern int xfrm_selector_match(struct xfrm_selector *sel, extern int xfrm_selector_match(const struct xfrm_selector *sel,
const struct flowi *fl, const struct flowi *fl,
unsigned short family); unsigned short family);
......
...@@ -58,7 +58,7 @@ static struct xfrm_policy *__xfrm_policy_unlink(struct xfrm_policy *pol, ...@@ -58,7 +58,7 @@ static struct xfrm_policy *__xfrm_policy_unlink(struct xfrm_policy *pol,
int dir); int dir);
static inline int static inline int
__xfrm4_selector_match(struct xfrm_selector *sel, const struct flowi *fl) __xfrm4_selector_match(const struct xfrm_selector *sel, const struct flowi *fl)
{ {
return addr_match(&fl->fl4_dst, &sel->daddr, sel->prefixlen_d) && return addr_match(&fl->fl4_dst, &sel->daddr, sel->prefixlen_d) &&
addr_match(&fl->fl4_src, &sel->saddr, sel->prefixlen_s) && addr_match(&fl->fl4_src, &sel->saddr, sel->prefixlen_s) &&
...@@ -69,7 +69,7 @@ __xfrm4_selector_match(struct xfrm_selector *sel, const struct flowi *fl) ...@@ -69,7 +69,7 @@ __xfrm4_selector_match(struct xfrm_selector *sel, const struct flowi *fl)
} }
static inline int static inline int
__xfrm6_selector_match(struct xfrm_selector *sel, const struct flowi *fl) __xfrm6_selector_match(const struct xfrm_selector *sel, const struct flowi *fl)
{ {
return addr_match(&fl->fl6_dst, &sel->daddr, sel->prefixlen_d) && return addr_match(&fl->fl6_dst, &sel->daddr, sel->prefixlen_d) &&
addr_match(&fl->fl6_src, &sel->saddr, sel->prefixlen_s) && addr_match(&fl->fl6_src, &sel->saddr, sel->prefixlen_s) &&
...@@ -79,7 +79,7 @@ __xfrm6_selector_match(struct xfrm_selector *sel, const struct flowi *fl) ...@@ -79,7 +79,7 @@ __xfrm6_selector_match(struct xfrm_selector *sel, const struct flowi *fl)
(fl->oif == sel->ifindex || !sel->ifindex); (fl->oif == sel->ifindex || !sel->ifindex);
} }
int xfrm_selector_match(struct xfrm_selector *sel, const struct flowi *fl, int xfrm_selector_match(const struct xfrm_selector *sel, const struct flowi *fl,
unsigned short family) unsigned short family)
{ {
switch (family) { switch (family) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment