Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet6/nd6_nbr.c
Show First 20 Lines • Show All 1,080 Lines • ▼ Show 20 Lines | |||||
nd6_ifptomac(struct ifnet *ifp) | nd6_ifptomac(struct ifnet *ifp) | ||||
{ | { | ||||
switch (ifp->if_type) { | switch (ifp->if_type) { | ||||
case IFT_ARCNET: | case IFT_ARCNET: | ||||
case IFT_ETHER: | case IFT_ETHER: | ||||
case IFT_FDDI: | case IFT_FDDI: | ||||
case IFT_IEEE1394: | case IFT_IEEE1394: | ||||
case IFT_L2VLAN: | case IFT_L2VLAN: | ||||
case IFT_IEEE80211: | |||||
case IFT_INFINIBAND: | case IFT_INFINIBAND: | ||||
case IFT_BRIDGE: | case IFT_BRIDGE: | ||||
case IFT_ISO88025: | case IFT_ISO88025: | ||||
return IF_LLADDR(ifp); | return IF_LLADDR(ifp); | ||||
default: | default: | ||||
return NULL; | return NULL; | ||||
} | } | ||||
} | } | ||||
▲ Show 20 Lines • Show All 354 Lines • ▼ Show 20 Lines | if (IN6_IS_ADDR_LINKLOCAL(&ia->ia_addr.sin6_addr)) { | ||||
* To avoid over-reaction, we only apply this logic when we are | * To avoid over-reaction, we only apply this logic when we are | ||||
* very sure that hardware addresses are supposed to be unique. | * very sure that hardware addresses are supposed to be unique. | ||||
*/ | */ | ||||
switch (ifp->if_type) { | switch (ifp->if_type) { | ||||
case IFT_ETHER: | case IFT_ETHER: | ||||
case IFT_FDDI: | case IFT_FDDI: | ||||
case IFT_ATM: | case IFT_ATM: | ||||
case IFT_IEEE1394: | case IFT_IEEE1394: | ||||
case IFT_IEEE80211: | |||||
case IFT_INFINIBAND: | case IFT_INFINIBAND: | ||||
in6 = ia->ia_addr.sin6_addr; | in6 = ia->ia_addr.sin6_addr; | ||||
if (in6_get_hw_ifid(ifp, &in6) == 0 && | if (in6_get_hw_ifid(ifp, &in6) == 0 && | ||||
IN6_ARE_ADDR_EQUAL(&ia->ia_addr.sin6_addr, &in6)) { | IN6_ARE_ADDR_EQUAL(&ia->ia_addr.sin6_addr, &in6)) { | ||||
ND_IFINFO(ifp)->flags |= ND6_IFF_IFDISABLED; | ND_IFINFO(ifp)->flags |= ND6_IFF_IFDISABLED; | ||||
log(LOG_ERR, "%s: possible hardware address " | log(LOG_ERR, "%s: possible hardware address " | ||||
"duplication detected, disable IPv6\n", | "duplication detected, disable IPv6\n", | ||||
if_name(ifp)); | if_name(ifp)); | ||||
▲ Show 20 Lines • Show All 77 Lines • Show Last 20 Lines |