Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet6/in6_ifattach.c
Show First 20 Lines • Show All 707 Lines • ▼ Show 20 Lines | in6_ifattach(struct ifnet *ifp, struct ifnet *altifp) | ||||
/* | /* | ||||
* assign loopback address for loopback interface. | * assign loopback address for loopback interface. | ||||
*/ | */ | ||||
if ((ifp->if_flags & IFF_LOOPBACK) != 0) { | if ((ifp->if_flags & IFF_LOOPBACK) != 0) { | ||||
/* | /* | ||||
* check that loopback address doesn't exist yet. | * check that loopback address doesn't exist yet. | ||||
*/ | */ | ||||
ia = in6ifa_ifwithaddr(&in6addr_loopback, 0); | ia = in6ifa_ifwithaddr(&in6addr_loopback, 0, false); | ||||
if (ia == NULL) | if (ia == NULL) | ||||
in6_ifattach_loopback(ifp); | in6_ifattach_loopback(ifp); | ||||
else | |||||
ifa_free(&ia->ia_ifa); | |||||
} | } | ||||
/* | /* | ||||
* assign a link-local address, if there's none. | * assign a link-local address, if there's none. | ||||
*/ | */ | ||||
if (!(ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED) && | if (!(ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED) && | ||||
ND_IFINFO(ifp)->flags & ND6_IFF_AUTO_LINKLOCAL) { | ND_IFINFO(ifp)->flags & ND6_IFF_AUTO_LINKLOCAL) { | ||||
struct epoch_tracker et; | struct epoch_tracker et; | ||||
▲ Show 20 Lines • Show All 176 Lines • Show Last 20 Lines |