aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/xfrm.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-05-15 15:04:57 -0400
committerDavid S. Miller <davem@davemloft.net>2012-05-15 15:04:57 -0400
commitbc9b35ad41387379e0b1257b3171da0dca73562d (patch)
tree958375afc01d7d7eba27cc54b7436d7d93502384 /include/net/xfrm.h
parente87cc4728f0e2fb663e592a1141742b1d6c63256 (diff)
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/xfrm.h')
-rw-r--r--include/net/xfrm.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index 1cb32bf107d..e0a55df5bde 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)
886 return port; 886 return port;
887} 887}
888 888
889extern int xfrm_selector_match(const struct xfrm_selector *sel, 889extern bool xfrm_selector_match(const struct xfrm_selector *sel,
890 const struct flowi *fl, 890 const struct flowi *fl,
891 unsigned short family); 891 unsigned short family);
892 892
893#ifdef CONFIG_SECURITY_NETWORK_XFRM 893#ifdef CONFIG_SECURITY_NETWORK_XFRM
894/* If neither has a context --> match 894/* If neither has a context --> match
895 * Otherwise, both must have a context and the sids, doi, alg must match 895 * Otherwise, both must have a context and the sids, doi, alg must match
896 */ 896 */
897static inline int xfrm_sec_ctx_match(struct xfrm_sec_ctx *s1, struct xfrm_sec_ctx *s2) 897static inline bool xfrm_sec_ctx_match(struct xfrm_sec_ctx *s1, struct xfrm_sec_ctx *s2)
898{ 898{
899 return ((!s1 && !s2) || 899 return ((!s1 && !s2) ||
900 (s1 && s2 && 900 (s1 && s2 &&
@@ -903,9 +903,9 @@ static inline int xfrm_sec_ctx_match(struct xfrm_sec_ctx *s1, struct xfrm_sec_ct
903 (s1->ctx_alg == s2->ctx_alg))); 903 (s1->ctx_alg == s2->ctx_alg)));
904} 904}
905#else 905#else
906static inline int xfrm_sec_ctx_match(struct xfrm_sec_ctx *s1, struct xfrm_sec_ctx *s2) 906static inline bool xfrm_sec_ctx_match(struct xfrm_sec_ctx *s1, struct xfrm_sec_ctx *s2)
907{ 907{
908 return 1; 908 return true;
909} 909}
910#endif 910#endif
911 911