Skip to content

Commit

Permalink
[NETFILTER]: ip6t_eui64: Fixes calculation of Universal/Local bit
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yasuyuki Kozakai authored and David S. Miller committed Jan 11, 2008
1 parent a6ca5f1 commit 8f41f01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv6/netfilter/ip6t_eui64.c
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 8f41f01

Please sign in to comment.