Bug 27660

Summary: Kernel does not return error if adding duplicate address
Product: Base System Reporter: Pekka Savola <pekkas>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.3-STABLE   
Hardware: Any   
OS: Any   

Description Pekka Savola 2001-05-26 15:30:01 UTC
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?
Comment 1 Maxim Konovalov freebsd_committer freebsd_triage 2011-07-29 12:01:37 UTC
State Changed
From-To: open->closed

It doesn't look like a bug for me.  Let me know if you 
want to keep this PR open.