Re: (usagi-core 34062) fix for eui64 match

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



# Sorry, I forgot replacing list address, so I resend

Hi,

Thanks for a patch. But the patch could not be applied because all tabs are
replaced with spaces. I've fixed them for 2.6 and 2.4 tree.

Patrick, please apply the attached patches (the first for linux-2.6 tree
at a few hours ago, the later is for 2.4).

BTW, Peter, netfilter-devel list was moved to
	netfilter-devel@xxxxxxxxxxxxxxx

Please subscribe and send messages to it next time.

Regards,

-- Yasuyuki Kozakai

From: Peter Ivancik <Peter.Ivancik@xxxxxxxxx>
Date: Tue, 18 Dec 2007 14:26:07 +0100

> Sorry, my stupid mistake. Here's correct version:
> 
> ####################################################################################
> diff -u net/ipv6/netfilter/ip6t_eui64.c.orig net/ipv6/netfilter/ip6t_eui64.c
> --- net/ipv6/netfilter/ip6t_eui64.c.orig        2007-12-18 12:47:00.000000000 +0100
> +++ net/ipv6/netfilter/ip6t_eui64.c     2007-12-18 10:38:23.000000000 +0100
> @@ -47,7 +47,7 @@
>                         memcpy(eui64 + 5, eth_hdr(skb)->h_source + 3, 3);
>                         eui64[3] = 0xff;
>                         eui64[4] = 0xfe;
> -                       eui64[0] |= 0x02;
> +                       eui64[0] ^= 0x02;
> 
>                         i = 0;
>                         while (ipv6_hdr(skb)->saddr.s6_addr[8 + i] == eui64[i]
> ####################################################################################
> 
> 	Peter
>
> On Tue, Dec 18, 2007 at 09:07:58PM +0900, YOSHIFUJI Hideaki / ?$B5HF#1QL@ wrote:
> > In article <20071218120129.GA24999@xxxxxxxxx> (at Tue, 18 Dec 2007 13:01:29 +0100), Peter Ivancik <Peter.Ivancik@xxxxxxxxx> says:
> > 
> > > I send you (after 3 years:) another report&fix for eui64 ip6tables module in
> > > linux kernel. There's mistake while testing complement
> > > of second least bit in firt byte. There must be
> > > XOR operation (RFC 2464 - paragraph 4.). So, now in code is line 
> > > "eui64[0] |= 0x02;" 
> > > and correct is 
> > > "eui64[0] ^= 0x02;"
> > > of linux/net/ipv6/netfilter/ip6t_eui64.c source file.
> > > 
> > > I hope it's correct. If yes, fix this problem in
> > > the next patch please.
> > 
> > Yup.
> > 
> > > --
> > > diff -u net/ipv6/netfilter/ip6t_eui64.c net/ipv6/netfilter/ip6t_eui64.c.orig
> > > 
> > > --- net/ipv6/netfilter/ip6t_eui64.c     2007-12-18 10:38:23.000000000 +0100
> > > +++ net/ipv6/netfilter/ip6t_eui64.c.orig 2007-12-18 12:47:00.000000000 +0100
> > 
> > > 			eui64[4] = 0xfe;
> > > -                       eui64[0] ^= 0x02;
> > > +			eui64[0] |= 0x02;
> > > 
> > 
> > Please send us forward patch (not reverse patch).
> > Please do not convert tabs into spaces.
> > 
> > Regards,
> > 
> > --yoshfuji
>From 9a58ccbfd268f509d56b201fb2b5f7f9c4a9040d Mon Sep 17 00:00:00 2001
From: Yasuyuki Kozakai <yasuyuki.kozakai@xxxxxxxxxxxxx>
Date: Wed, 26 Dec 2007 15:57:39 +0900
Subject: [NETFILTER]: ip6t_eui64: Fixes calculation of Universal/Local bit

RFC2464 says that the next to lowerst order bit of the first octet
of the Interface Identifier is formed by complementing
the Universal/Local bit of the EUI-64. But ip6t_eui64 uses OR not XOR.

Thanks Peter Ivancik for reporing this bug and posting a patch
for it.

Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai@xxxxxxxxxxxxx>
---
 net/ipv6/netfilter/ip6t_eui64.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/ipv6/netfilter/ip6t_eui64.c b/net/ipv6/netfilter/ip6t_eui64.c
index 34ba150..41df9a5 100644
--- a/net/ipv6/netfilter/ip6t_eui64.c
+++ b/net/ipv6/netfilter/ip6t_eui64.c
@@ -47,7 +47,7 @@ match(const struct sk_buff *skb,
 			memcpy(eui64 + 5, eth_hdr(skb)->h_source + 3, 3);
 			eui64[3] = 0xff;
 			eui64[4] = 0xfe;
-			eui64[0] |= 0x02;
+			eui64[0] ^= 0x02;
 
 			i = 0;
 			while (ipv6_hdr(skb)->saddr.s6_addr[8 + i] == eui64[i]
-- 
1.5.3.6

>From acb6e566b07c8f8494ca2f66c1d56d92ed6876bc Mon Sep 17 00:00:00 2001
From: Yasuyuki Kozakai <yasuyuki.kozakai@xxxxxxxxxxxxx>
Date: Wed, 26 Dec 2007 16:05:44 +0900
Subject: [NETFILTER]: ip6t_eui64: Fixes calculation of Universal/Local bit

RFC2464 says that the next to lowerst order bit of the first octet
of the Interface Identifier is formed by complementing
the Universal/Local bit of the EUI-64. But ip6t_eui64 uses OR not XOR.

Thanks Peter Ivancik for reporing this bug and posting a patch
for it.

Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai@xxxxxxxxxxxxx>
---
 net/ipv6/netfilter/ip6t_eui64.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/ipv6/netfilter/ip6t_eui64.c b/net/ipv6/netfilter/ip6t_eui64.c
index 5f91a5b..32dee34 100644
--- a/net/ipv6/netfilter/ip6t_eui64.c
+++ b/net/ipv6/netfilter/ip6t_eui64.c
@@ -35,7 +35,7 @@ match(const struct sk_buff *skb,
          memcpy(eui64 + 5, skb->mac.ethernet->h_source + 3, 3);
 	 eui64[3]=0xff;
 	 eui64[4]=0xfe;
-	 eui64[0] |= 0x02;
+	 eui64[0] ^= 0x02;
 
 	 i=0;
 	 while ((skb->nh.ipv6h->saddr.in6_u.u6_addr8[8+i] ==
-- 
1.5.3.6


[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux