rtsol set IFF_UP when started - why?

MrMulleMeck mrmullemeck at gmail.com
Fri May 20 15:39:27 UTC 2011


When rtsol(d) starts, it check the interface status (flags). If flags
are not (IFF_UP|IFF_RUNNING) rtsol concludes the interface is "not
active". However, immediately after this, rtsol will activate/set the
IFF_UP flag (if not set) causing DAD to start. Let say that the link
is not ready yet (but in a short period of time) when rtsold starts,
wouldn't this cause DAD to believe that the address is OK (no response
since RS messages are actually never sent over the wire)?
What is the rationale (if any) for rtsol to set the IFF_UP flag? It
seems that rtsold will wait anyway for DAD later on?

interface_up(char *name)
{
...
	if (!(ifr.ifr_flags & IFF_UP)) {
		ifr.ifr_flags |= IFF_UP;
		if (ioctl(ifsock, SIOCSIFFLAGS, (caddr_t)&ifr) < 0)
			warnmsg(LOG_ERR, __func__,
			    "ioctl(SIOCSIFFLAGS): %s", strerror(errno));
		return(-1);
	}


BR,
MM


More information about the freebsd-net mailing list