fix u bit in interface identifier for ether and p2p-802 interfacde.
This commit is contained in:
parent
6913f83874
commit
a00c3d5ea1
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: in6_ifattach.c,v 1.5 1999/09/05 01:57:10 itojun Exp $ */
|
/* $NetBSD: in6_ifattach.c,v 1.6 1999/09/08 00:50:15 itojun Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
|
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
|
||||||
@ -315,6 +315,8 @@ in6_ifattach(ifp, type, laddr, noloop)
|
|||||||
if (laddr == NULL)
|
if (laddr == NULL)
|
||||||
break;
|
break;
|
||||||
ieee802_to_eui64(&ia->ia_addr.sin6_addr.s6_addr8[8], laddr);
|
ieee802_to_eui64(&ia->ia_addr.sin6_addr.s6_addr8[8], laddr);
|
||||||
|
/* invert u bit to convert EUI64 to RFC2373 interface ID. */
|
||||||
|
ia->ia_addr.sin6_addr.s6_addr8[8] ^= 0x02;
|
||||||
if (found_first_ifid == 0) {
|
if (found_first_ifid == 0) {
|
||||||
if (in6_ifattach_getifid(ifp) == 0)
|
if (in6_ifattach_getifid(ifp) == 0)
|
||||||
in6_ifattach_p2p();
|
in6_ifattach_p2p();
|
||||||
|
Loading…
Reference in New Issue
Block a user