From: Giuseppe Longo <giuseppelng@gmail.com>
To: netfilter-devel@vger.kernel.org
Cc: Giuseppe Longo <giuseppelng@gmail.com>
Subject: [PATCH] nft-arp: remove wrong conditions
Date: Sat, 9 Aug 2014 01:04:17 +0200 [thread overview]
Message-ID: <1407539057-4781-1-git-send-email-giuseppelng@gmail.com> (raw)
Removes wrong conditions in flags translating functions
that doesn't permit to delete rule with inverse flags set.
For instance, the following command doesn't remove the rule:
arptables-compat -D INPUT -i ! eth1 -j ACCEPT
Signed-off-by: Giuseppe Longo <giuseppelng@gmail.com>
---
iptables/nft-arp.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/iptables/nft-arp.c b/iptables/nft-arp.c
index c1cbbc0..c3cfee9 100644
--- a/iptables/nft-arp.c
+++ b/iptables/nft-arp.c
@@ -155,9 +155,6 @@ static uint8_t arpt_to_ipt_flags(uint16_t invflags)
if (invflags & ARPT_INV_ARPPRO)
result |= IPT_INV_PROTO;
- if (invflags & ARPT_INV_MASK)
- result |= IPT_INV_MASK;
-
return result;
}
@@ -257,9 +254,6 @@ static uint16_t ipt_to_arpt_flags(uint8_t invflags)
if (invflags & IPT_INV_PROTO)
result |= ARPT_INV_ARPPRO;
- if (invflags & IPT_INV_MASK)
- result |= ARPT_INV_MASK;
-
return result;
}
--
1.8.3.2
next reply other threads:[~2014-08-08 23:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-08 23:04 Giuseppe Longo [this message]
2014-08-11 16:44 ` [PATCH] nft-arp: remove wrong conditions Pablo Neira Ayuso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1407539057-4781-1-git-send-email-giuseppelng@gmail.com \
--to=giuseppelng@gmail.com \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.