- Do not assign a link-local address when ND6_IFF_IFDISABLED.

Adding a tentative address is useless.

- Comment out a confused warning message when
  in6_ifattach_linklocal() fails.  This can occur when the
  interface does not support ioctl(SIOCAIFADDR) (interfaces
  associated with 802.11 wireless network device drivers, for
  example).
This commit is contained in:
Hiroki Sato 2009-10-12 18:54:02 +00:00
parent e62aa473c5
commit 27f13d5d0f

View File

@ -751,16 +751,19 @@ in6_ifattach(struct ifnet *ifp, struct ifnet *altifp)
* assign a link-local address, if there's none.
*/
if (ifp->if_type != IFT_BRIDGE &&
!(ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED) &&
ND_IFINFO(ifp)->flags & ND6_IFF_AUTO_LINKLOCAL) {
int error;
ia = in6ifa_ifpforlinklocal(ifp, 0);
if (ia == NULL) {
error = in6_ifattach_linklocal(ifp, altifp);
#if 0
if (error)
log(LOG_NOTICE, "in6_ifattach_linklocal: "
"failed to add a link-local addr to %s\n",
if_name(ifp));
#endif
} else
ifa_free(&ia->ia_ifa);
}