From owner-freebsd-bugs Sat May 26 7:30: 6 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 9E02C37B423 for ; Sat, 26 May 2001 07:30:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f4QEU1B32620; Sat, 26 May 2001 07:30:01 -0700 (PDT) (envelope-from gnats) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id BF1B837B423 for ; Sat, 26 May 2001 07:26:29 -0700 (PDT) (envelope-from nobody@FreeBSD.org) Received: (from nobody@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f4QEQTR32392; Sat, 26 May 2001 07:26:29 -0700 (PDT) (envelope-from nobody) Message-Id: <200105261426.f4QEQTR32392@freefall.freebsd.org> Date: Sat, 26 May 2001 07:26:29 -0700 (PDT) From: pekkas@netcore.fi To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: kern/27660: Kernel does not return error if adding duplicate address Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 27660 >Category: kern >Synopsis: Kernel does not return error if adding duplicate address >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat May 26 07:30:01 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Pekka Savola >Release: 4.3-STABLE >Organization: Netcore >Environment: >Description: 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? >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message