From nobody@FreeBSD.org  Sat May 26 07:26:30 2001
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id BF1B837B423
	for <freebsd-gnats-submit@FreeBSD.org>; 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
Subject: Kernel does not return error if adding duplicate address
X-Send-Pr-Version: www-1.0

>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:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat May 26 07:30:01 PDT 2001
>Closed-Date:    Fri Jul 29 11:02:38 UTC 2011
>Last-Modified:  Fri Jul 29 11:02:38 UTC 2011
>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:
State-Changed-From-To: open->closed 
State-Changed-By: maxim 
State-Changed-When: Fri Jul 29 11:01:37 UTC 2011 
State-Changed-Why:  
It doesn't look like a bug for me.  Let me know if you 
want to keep this PR open. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=27660 
>Unformatted:
