From owner-freebsd-stable Fri May 18 7:10:56 2001 Delivered-To: freebsd-stable@freebsd.org Received: from netcore.fi (netcore.fi [193.94.160.1]) by hub.freebsd.org (Postfix) with ESMTP id C275237B423 for ; Fri, 18 May 2001 07:10:52 -0700 (PDT) (envelope-from pekkas@netcore.fi) Received: from localhost (pekkas@localhost) by netcore.fi (8.11.1/8.11.1) with ESMTP id f4IEAjd23310 for ; Fri, 18 May 2001 17:10:46 +0300 Date: Fri, 18 May 2001 17:10:45 +0300 (EEST) From: Pekka Savola To: Subject: Kernel does not return error if adding duplicate address Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi, I noticed that if you add an address twice, with e.g. 'ifconfig rl0 10.1.1.1 mask 255.255.255.0 add', the second time the kernel does not return error to SIOCAIFADDR. This seems to be because in sys/netinet/in.c, 'error' will remain 0 even if the checks set hostIsNew=0. The same applies to IPv6 and other BSD's. This seems like a feature to me. I wonder about the justification though; if user wants to add an address, the most important thing always IMO should be to report failure if that happens. Or is this a bug? Please Cc:. -- Pekka Savola "Tell me of difficulties surmounted, Netcore Oy not those you stumble over and fall" Systems. Networks. Security. -- Robert Jordan: A Crown of Swords To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message