All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Steven Jan Springl <steven@springl.ukfsn.org>
Cc: netfilter-devel@vger.kernel.org, Bart De Schuymer <bdschuym@pandora.be>
Subject: Re: arptables bug.
Date: Mon, 7 Jan 2013 04:24:15 +0100	[thread overview]
Message-ID: <20130107032415.GA18563@1984> (raw)
In-Reply-To: <201301052056.18524.steven@springl.ukfsn.org>

[-- Attachment #1: Type: text/plain, Size: 440 bytes --]

On Sat, Jan 05, 2013 at 08:56:18PM +0000, Steven Jan Springl wrote:
> Hello
> 
> I am using arptables v0.0.3.4 in Debian Squeeze.
> 
> Issuing command:
> 
> aptables -A INPUT -i eth0 --opcode ! 1 -j DROP
> 
> Then issuing command arptables-save produces the following:
> 
> -A INPUT -j DROP -i eth0  --opcode 1
> 
> The "!" is missing from the opcode.

Patch attached to fix it.

Bart, could you please apply this to your git repo? Thanks.

[-- Attachment #2: 0001-arptables-fix-opcode-1-in-L-n-output.patch --]
[-- Type: text/x-diff, Size: 829 bytes --]

>From b83962f7ad5b65468d6e1ce099e970afd336c3b1 Mon Sep 17 00:00:00 2001
From: Pablo Neira Ayuso <pablo@netfilter.org>
Date: Mon, 7 Jan 2013 04:14:22 +0100
Subject: [PATCH] arptables: fix ! --opcode 1 in -L -n output

The imbalance in the array is likely to fix the negation of:

--h-type, --proto-type, -i and -o.
---
 userspace/arptables/arptables.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/userspace/arptables/arptables.c b/userspace/arptables/arptables.c
index 2f048c7..29ccd22 100644
--- a/userspace/arptables/arptables.c
+++ b/userspace/arptables/arptables.c
@@ -204,6 +204,7 @@ static int inverse_for_options[NUMBER_OF_OPT] =
 /* 2 */ ARPT_INV_SRCDEVADDR,
 /* 3 */ ARPT_INV_TGTDEVADDR,
 /* -l */ ARPT_INV_ARPHLN,
+	0,
 /* 4 */ ARPT_INV_ARPOP,
 /* 5 */ ARPT_INV_ARPHRD,
 /* 6 */ ARPT_INV_ARPPRO,
-- 
1.7.10.4


  reply	other threads:[~2013-01-07  3:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-05 20:56 arptables bug Steven Jan Springl
2013-01-07  3:24 ` Pablo Neira Ayuso [this message]
2013-01-07 20:20   ` Bart De Schuymer
2013-01-07 20:50   ` Steven Jan Springl

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=20130107032415.GA18563@1984 \
    --to=pablo@netfilter.org \
    --cc=bdschuym@pandora.be \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=steven@springl.ukfsn.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.