All of lore.kernel.org
 help / color / mirror / Atom feed
* [NETFILTER 2.4]: ip6t_eui64: Fixes calculation of Universal/Local bit
@ 2008-01-10 15:47 Patrick McHardy
  0 siblings, 0 replies; only message in thread
From: Patrick McHardy @ 2008-01-10 15:47 UTC (permalink / raw)
  To: David S. Miller; +Cc: Netfilter Development Mailinglist

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



[-- Attachment #2: 01.diff --]
[-- Type: text/x-patch, Size: 1298 bytes --]

[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@toshiba.co.jp>
Signed-off-by: Patrick McHardy <kaber@trash.net>

---
commit b7be830f3cd1887102daff6291b98a12fbab610c
tree 2968b26348984dbfa1ad6ad0885c226789b99943
parent f8c88465924895f1fead9ef0602baf6e13f940ae
author Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp> Wed, 26 Dec 2007 16:05:44 +0900
committer Patrick McHardy <kaber@trash.net> Fri, 28 Dec 2007 16:37:40 +0100

 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] ==

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2008-01-10 15:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-10 15:47 [NETFILTER 2.4]: ip6t_eui64: Fixes calculation of Universal/Local bit Patrick McHardy

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.