|
@@ -26,8 +26,9 @@ MODULE_LICENSE("GPL");
|
|
static inline int
|
|
static inline int
|
|
match_xfrm_state(struct xfrm_state *x, const struct ip6t_policy_elem *e)
|
|
match_xfrm_state(struct xfrm_state *x, const struct ip6t_policy_elem *e)
|
|
{
|
|
{
|
|
-#define MATCH_ADDR(x,y,z) (!e->match.x || \
|
|
|
|
- ((ip6_masked_addrcmp((z), &e->x, &e->y)) == 0) ^ e->invert.x)
|
|
|
|
|
|
+#define MATCH_ADDR(x,y,z) (!e->match.x || \
|
|
|
|
+ ((!ip6_masked_addrcmp(&e->x, &e->y, z)) \
|
|
|
|
+ ^ e->invert.x))
|
|
#define MATCH(x,y) (!e->match.x || ((e->x == (y)) ^ e->invert.x))
|
|
#define MATCH(x,y) (!e->match.x || ((e->x == (y)) ^ e->invert.x))
|
|
|
|
|
|
return MATCH_ADDR(saddr, smask, (struct in6_addr *)&x->props.saddr.a6) &&
|
|
return MATCH_ADDR(saddr, smask, (struct in6_addr *)&x->props.saddr.a6) &&
|