diff --git a/sys/netinet6/in6_ifattach.c b/sys/netinet6/in6_ifattach.c index 6f8552984cc3..94521b1e857c 100644 --- a/sys/netinet6/in6_ifattach.c +++ b/sys/netinet6/in6_ifattach.c @@ -1,4 +1,4 @@ -/* $NetBSD: in6_ifattach.c,v 1.9 1999/09/19 21:42:23 is Exp $ */ +/* $NetBSD: in6_ifattach.c,v 1.10 1999/09/20 02:35:44 itojun Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -75,6 +75,8 @@ laddr_to_eui64(dst, src, 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: dst[0] = src[0]; @@ -131,8 +133,6 @@ in6_ifattach_getifid(ifp0) case IFT_ETHER: case IFT_FDDI: case IFT_ATM: - case IFT_ARCNET: - /* what others? */ /* IEEE802/EUI64 cases - what others? */ addr = LLADDR(sdl); addrlen = sdl->sdl_alen; @@ -143,6 +143,13 @@ in6_ifattach_getifid(ifp0) if ((addr[0] & 0x02) != 0) break; goto found; + case IFT_ARCNET: + /* + * ARCnet interface token cannot be used as + * globally unique identifier due to its + * small bitwidth. + */ + break; default: break; } diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c index bdd2f0e55b6e..e46aaa9d6d4f 100644 --- a/sys/netinet6/nd6.c +++ b/sys/netinet6/nd6.c @@ -1,4 +1,4 @@ -/* $NetBSD: nd6.c,v 1.9 1999/09/19 21:31:35 is Exp $ */ +/* $NetBSD: nd6.c,v 1.10 1999/09/20 02:35:44 itojun Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -1492,9 +1492,14 @@ nd6_output(ifp, m0, dst, rt0) * XXX: we currently do not make neighbor cache on any interface * other than ARCnet, Ethernet and FDDI. */ - if (ifp->if_type != IFT_ARCNET && - ifp->if_type != IFT_ETHER && ifp->if_type != IFT_FDDI) + switch (ifp->if_type) { + case IFT_ARCNET: + case IFT_ETHER: + case IFT_FDDI: + break; + default: goto sendpkt; + } /* * next hop determination. This routine is derived from ether_outpout.