Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 May 2001 17:10:45 +0300 (EEST)
From:      Pekka Savola <pekkas@netcore.fi>
To:        <freebsd-stable@freebsd.org>
Subject:   Kernel does not return error if adding duplicate address
Message-ID:  <Pine.LNX.4.33.0105181700460.23234-100000@netcore.fi>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.33.0105181700460.23234-100000>