[NETFILTER]: ip6t_eui64: Fixes calculation of Universal/Local bit

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Tuesday, January 15, 2008 - 11:59 am

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8f41f0...
Commit:     8f41f017866bc3dfe4db02582cfd48f0586cb990
Parent:     a6ca5f1dbe40470fcb1ecc921769d792a1e77ed9
Author:     Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp>
AuthorDate: Thu Jan 10 22:40:39 2008 -0800
Committer:  David S. Miller <davem@davemloft.net>
CommitDate: Thu Jan 10 22:40:39 2008 -0800

    [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>
    Signed-off-by: David S. Miller <davem@davemloft.net>
---
 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]
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[NETFILTER]: ip6t_eui64: Fixes calculation of Universal/Lo ..., Linux Kernel Mailing ..., (Tue Jan 15, 11:59 am)