diff options
author | Luís Fernando Cornachioni Estrozi <lestrozi@uolinc.com> | 2013-11-06 16:39:32 -0500 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2013-11-19 09:33:29 -0500 |
commit | acab78b99633f12aa2b697474562e19c5718a1ca (patch) | |
tree | cdc121d5fe9c2c6cc6b81a7e30ad7ed39c09cc1c /net | |
parent | 0c3c6c00c69649f4749642b3e5d82125fde1600c (diff) |
netfilter: ebt_ip6: fix source and destination matching
This bug was introduced on commit 0898f99a2. This just recovers two
checks that existed before as suggested by Bart De Schuymer.
Signed-off-by: Luís Fernando Cornachioni Estrozi <lestrozi@uolinc.com>
Signed-off-by: Bart De Schuymer <bdschuym@pandora.be>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/bridge/netfilter/ebt_ip6.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/bridge/netfilter/ebt_ip6.c b/net/bridge/netfilter/ebt_ip6.c index 99c85668f551..17fd5f2cb4b8 100644 --- a/net/bridge/netfilter/ebt_ip6.c +++ b/net/bridge/netfilter/ebt_ip6.c | |||
@@ -48,10 +48,12 @@ ebt_ip6_mt(const struct sk_buff *skb, struct xt_action_param *par) | |||
48 | if (info->bitmask & EBT_IP6_TCLASS && | 48 | if (info->bitmask & EBT_IP6_TCLASS && |
49 | FWINV(info->tclass != ipv6_get_dsfield(ih6), EBT_IP6_TCLASS)) | 49 | FWINV(info->tclass != ipv6_get_dsfield(ih6), EBT_IP6_TCLASS)) |
50 | return false; | 50 | return false; |
51 | if (FWINV(ipv6_masked_addr_cmp(&ih6->saddr, &info->smsk, | 51 | if ((info->bitmask & EBT_IP6_SOURCE && |
52 | &info->saddr), EBT_IP6_SOURCE) || | 52 | FWINV(ipv6_masked_addr_cmp(&ih6->saddr, &info->smsk, |
53 | &info->saddr), EBT_IP6_SOURCE)) || | ||
54 | (info->bitmask & EBT_IP6_DEST && | ||
53 | FWINV(ipv6_masked_addr_cmp(&ih6->daddr, &info->dmsk, | 55 | FWINV(ipv6_masked_addr_cmp(&ih6->daddr, &info->dmsk, |
54 | &info->daddr), EBT_IP6_DEST)) | 56 | &info->daddr), EBT_IP6_DEST))) |
55 | return false; | 57 | return false; |
56 | if (info->bitmask & EBT_IP6_PROTO) { | 58 | if (info->bitmask & EBT_IP6_PROTO) { |
57 | uint8_t nexthdr = ih6->nexthdr; | 59 | uint8_t nexthdr = ih6->nexthdr; |