Commit 8f41f017 authored by Yasuyuki Kozakai's avatar Yasuyuki Kozakai Committed by David S. Miller

[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: default avatarYasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp>
Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a6ca5f1d
...@@ -47,7 +47,7 @@ match(const struct sk_buff *skb, ...@@ -47,7 +47,7 @@ match(const struct sk_buff *skb,
memcpy(eui64 + 5, eth_hdr(skb)->h_source + 3, 3); memcpy(eui64 + 5, eth_hdr(skb)->h_source + 3, 3);
eui64[3] = 0xff; eui64[3] = 0xff;
eui64[4] = 0xfe; eui64[4] = 0xfe;
eui64[0] |= 0x02; eui64[0] ^= 0x02;
i = 0; i = 0;
while (ipv6_hdr(skb)->saddr.s6_addr[8 + i] == eui64[i] while (ipv6_hdr(skb)->saddr.s6_addr[8 + i] == eui64[i]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment