From owner-freebsd-net@FreeBSD.ORG Fri May 20 15:39:27 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF0D7106566C for ; Fri, 20 May 2011 15:39:27 +0000 (UTC) (envelope-from mrmullemeck@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 4976B8FC20 for ; Fri, 20 May 2011 15:39:26 +0000 (UTC) Received: by wwc33 with SMTP id 33so3987629wwc.31 for ; Fri, 20 May 2011 08:39:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=5zCN5s0S9cIY5FmPIaDZk6Fubbe1mQQlepyVqdWpNto=; b=Zh0UtdQvJS9S3AfUK1B1C1orZDdRKu4mOvWqSRwCBvfsKKSGQ43wPY3dgwCtpj6i54 tvJ9rggLzR2N9uGG08otU4eFmyKboPj3RwPhi5jqAsbzliEvYdmaTAqUdHRh6xck2zKp 5dyzEZlhOIeihetIIjCjBZr0NtfUhv5g5D9UQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=gkK8oVAj0buetjFIo2PokvULzthzOU2Xhsef8Tttw2URQTSSKKMv49StNsytGRaOOC Oze/ln8texVwGA1Rh/2f0un7PGuQg6+yXomKjBCE+Jau3GK8nzroAhN1NVPE2CBNzAjC n3xEM+yk4fW7/X3COyKkHiA5MrkFjFQ/rNMmI= MIME-Version: 1.0 Received: by 10.216.221.30 with SMTP id q30mr4085669wep.84.1305904097295; Fri, 20 May 2011 08:08:17 -0700 (PDT) Received: by 10.216.230.131 with HTTP; Fri, 20 May 2011 08:08:17 -0700 (PDT) Date: Fri, 20 May 2011 17:08:17 +0200 Message-ID: From: MrMulleMeck To: freebsd-net@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Subject: rtsol set IFF_UP when started - why? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 May 2011 15:39:27 -0000 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