diff options
author | David S. Miller <davem@davemloft.net> | 2012-05-15 15:04:57 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-15 15:04:57 -0400 |
commit | bc9b35ad41387379e0b1257b3171da0dca73562d (patch) | |
tree | 958375afc01d7d7eba27cc54b7436d7d93502384 /include/net | |
parent | e87cc4728f0e2fb663e592a1141742b1d6c63256 (diff) | |
download | op-kernel-dev-bc9b35ad41387379e0b1257b3171da0dca73562d.zip op-kernel-dev-bc9b35ad41387379e0b1257b3171da0dca73562d.tar.gz |
xfrm: Convert several xfrm policy match functions to bool.
xfrm_selector_match
xfrm_sec_ctx_match
__xfrm4_selector_match
__xfrm6_selector_match
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/xfrm.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 1cb32bf..e0a55df 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -886,15 +886,15 @@ __be16 xfrm_flowi_dport(const struct flowi *fl, const union flowi_uli *uli) return port; } -extern int xfrm_selector_match(const struct xfrm_selector *sel, - const struct flowi *fl, - unsigned short family); +extern bool xfrm_selector_match(const struct xfrm_selector *sel, + const struct flowi *fl, + unsigned short family); #ifdef CONFIG_SECURITY_NETWORK_XFRM /* If neither has a context --> match * Otherwise, both must have a context and the sids, doi, alg must match */ -static inline int xfrm_sec_ctx_match(struct xfrm_sec_ctx *s1, struct xfrm_sec_ctx *s2) +static inline bool xfrm_sec_ctx_match(struct xfrm_sec_ctx *s1, struct xfrm_sec_ctx *s2) { return ((!s1 && !s2) || (s1 && s2 && @@ -903,9 +903,9 @@ static inline int xfrm_sec_ctx_match(struct xfrm_sec_ctx *s1, struct xfrm_sec_ct (s1->ctx_alg == s2->ctx_alg))); } #else -static inline int xfrm_sec_ctx_match(struct xfrm_sec_ctx *s1, struct xfrm_sec_ctx *s2) +static inline bool xfrm_sec_ctx_match(struct xfrm_sec_ctx *s1, struct xfrm_sec_ctx *s2) { - return 1; + return true; } #endif |