All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: "David S. Miller" <davem@davemloft.net>
Cc: Netfilter Development Mailinglist <netfilter-devel@vger.kernel.org>
Subject: [NETFILTER try 2]: ip6t_eui64: Fixes calculation of Universal/Local bit
Date: Thu, 10 Jan 2008 17:34:23 +0100	[thread overview]
Message-ID: <4786490F.5090001@trash.net> (raw)
In-Reply-To: <47863DA1.8090907@trash.net>

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



[-- Attachment #2: 01.diff --]
[-- Type: text/x-patch, Size: 1302 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 7bd5c38839308e24911fffa749b3e53391c7de14
tree ad132f231a7a65312af368dc608714b5e595bc22
parent fd0b45dfd1858c6b49d06355a460bcf36d654c06
author Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp> Wed, 26 Dec 2007 15:57:39 +0900
committer Patrick McHardy <kaber@trash.net> Thu, 10 Jan 2008 16:44:14 +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 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]

  reply	other threads:[~2008-01-10 16:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-10 15:45 [NETFILTER]: ip6t_eui64: Fixes calculation of Universal/Local bit Patrick McHardy
2008-01-10 16:34 ` Patrick McHardy [this message]
2008-01-11  6:40   ` [NETFILTER try 2]: " David Miller

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=4786490F.5090001@trash.net \
    --to=kaber@trash.net \
    --cc=davem@davemloft.net \
    --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.