Commit 32c3b723 authored by Bart De Schuymer's avatar Bart De Schuymer Committed by David S. Miller

net/ipv4/netfilter/ipt_physdev.c: Bug fix in matching.

parent 4cbbc184
...@@ -38,8 +38,8 @@ match(const struct sk_buff *skb, ...@@ -38,8 +38,8 @@ match(const struct sk_buff *skb,
& ((const unsigned long *)info->in_mask)[i]; & ((const unsigned long *)info->in_mask)[i];
} }
if ((ret != 0) ^ !(info->invert & IPT_PHYSDEV_OP_MATCH_IN)) if ((ret == 0) ^ !(info->invert & IPT_PHYSDEV_OP_MATCH_IN))
return 1; return 0;
for (i = 0, ret = 0; i < IFNAMSIZ/sizeof(unsigned long); i++) { for (i = 0, ret = 0; i < IFNAMSIZ/sizeof(unsigned long); i++) {
ret |= (((const unsigned long *)outdev)[i] ret |= (((const unsigned long *)outdev)[i]
......
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