netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* arptables bug.
@ 2013-01-05 20:56 Steven Jan Springl
  2013-01-07  3:24 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 4+ messages in thread
From: Steven Jan Springl @ 2013-01-05 20:56 UTC (permalink / raw)
  To: netfilter-devel

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.

Regards.

Steven.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: arptables bug.
  2013-01-05 20:56 arptables bug Steven Jan Springl
@ 2013-01-07  3:24 ` Pablo Neira Ayuso
  2013-01-07 20:20   ` Bart De Schuymer
  2013-01-07 20:50   ` Steven Jan Springl
  0 siblings, 2 replies; 4+ messages in thread
From: Pablo Neira Ayuso @ 2013-01-07  3:24 UTC (permalink / raw)
  To: Steven Jan Springl; +Cc: netfilter-devel, Bart De Schuymer

[-- 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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: arptables bug.
  2013-01-07  3:24 ` Pablo Neira Ayuso
@ 2013-01-07 20:20   ` Bart De Schuymer
  2013-01-07 20:50   ` Steven Jan Springl
  1 sibling, 0 replies; 4+ messages in thread
From: Bart De Schuymer @ 2013-01-07 20:20 UTC (permalink / raw)
  To: Pablo Neira Ayuso; +Cc: Steven Jan Springl, netfilter-devel

Hi Pablo,

I've applied (a slightly different version of) your patch, thanks. I'll 
make a new release somewhere this week.

cheers,
Bart

Op 7/01/2013 4:24, Pablo Neira Ayuso schreef:
> 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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: arptables bug.
  2013-01-07  3:24 ` Pablo Neira Ayuso
  2013-01-07 20:20   ` Bart De Schuymer
@ 2013-01-07 20:50   ` Steven Jan Springl
  1 sibling, 0 replies; 4+ messages in thread
From: Steven Jan Springl @ 2013-01-07 20:50 UTC (permalink / raw)
  To: Pablo Neira Ayuso; +Cc: netfilter-devel

On Monday 07 Jan 2013 03:24:15 Pablo Neira Ayuso wrote:
> 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.

Pablo

I can confirm that the patch corrects the bug.

Thanks.

Steven.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-01-07 20:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-05 20:56 arptables bug Steven Jan Springl
2013-01-07  3:24 ` Pablo Neira Ayuso
2013-01-07 20:20   ` Bart De Schuymer
2013-01-07 20:50   ` Steven Jan Springl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).