Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

change the way IFT_ARCNET interface id is generated.

sync with NetBSD-current.
  • Loading branch information...
commit 7902baaada1874906a5c2ba38c5e914ac3ad3d90 1 parent db86ebe
itojun authored
Showing with 5 additions and 13 deletions.
  1. +1 −0  kame/sys/netinet6/in6.c
  2. +4 −13 kame/sys/netinet6/in6_ifattach.c
View
1  kame/sys/netinet6/in6.c
@@ -1314,6 +1314,7 @@ in6_ifinit(ifp, ia, sin6, scrub)
}
switch (ifp->if_type) {
+ case IFT_ARCNET:
case IFT_ETHER:
case IFT_FDDI:
ia->ia_ifa.ifa_rtrequest = nd6_rtrequest;
View
17 kame/sys/netinet6/in6_ifattach.c
@@ -89,12 +89,6 @@ laddr_to_eui64(dst, src, len)
bzero(zero, sizeof(zero));
switch (len) {
- case 1:
- bzero(dst, 7);
- dst[7] = src[0];
- /* raise u bit to indicate that this is not globally unique */
- dst[0] |= 0x02;
- break;
case 6:
if (bcmp(zero, src, 6) == 0)
return EINVAL;
@@ -498,13 +492,10 @@ in6_ifattach(ifp, type, laddr, noloop)
rtflag = RTF_CLONING;
if (laddr == NULL)
break;
- if (laddr_to_eui64(&ia->ia_addr.sin6_addr.s6_addr8[8],
- laddr, 1) != 0) {
- break;
- }
- /* invert u bit to convert EUI64 to RFC2373 interface ID. */
- ia->ia_addr.sin6_addr.s6_addr8[8] ^= 0x02;
- break;
+
+ /* make non-global IF id out of link-level address */
+ bzero(&ia->ia_addr.sin6_addr.s6_addr8[8], 7);
+ ia->ia_addr.sin6_addr.s6_addr8[15] = *laddr;
}
ia->ia_ifa.ifa_metric = ifp->if_metric;
Please sign in to comment.
Something went wrong with that request. Please try again.