Remove the code that masks an EEXIST returned from rtinit() when

calling ioctl(SIOC[AS]IFADDR).

This allows the following:

  ifconfig xx0 inet 1.2.3.1 netmask 0xffffff00
  ifconfig xx0 inet 1.2.3.17 netmask 0xfffffff0 alias
  ifconfig xx0 inet 1.2.3.25 netmask 0xfffffff8 alias
  ifconfig xx0 inet 1.2.3.26 netmask 0xffffffff alias

but would (given the above) reject this:

  ifconfig xx0 inet 1.2.3.27 netmask 0xfffffff8 alias

due to the conflicting netmasks.  I would assert that it's wrong
to mask the EEXIST returned from rtinit() as in the above scenario, the
deletion of the 1.2.3.25 address will leave the 1.2.3.27 address
as unroutable as it was in the first place.

Offered for review on: -arch, -net
Discussed with: stephen macmanus <stephenm@bayarea.net>
MFC after: 3 weeks
This commit is contained in:
Brian Somers 2002-04-10 01:42:44 +00:00
parent 5a43847d1c
commit 6ce6e2be71

View File

@ -743,10 +743,6 @@ in_ifinit(ifp, ia, sin, scrub)
ia->ia_flags |= IFA_ROUTE;
}
/* XXX check if the subnet route points to the same interface */
if (error == EEXIST)
error = 0;
/*
* If the interface supports multicast, join the "all hosts"
* multicast group on that interface.