Don't set ifaddr::in_addrs to 1 after an ``iface clear'' on an interface

with no addresses.
This commit is contained in:
Brian Somers 2000-01-07 03:47:12 +00:00
parent 35099b5d17
commit 278657c32d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=55531

View File

@ -251,6 +251,7 @@ iface_inClear(struct iface *iface, int how)
{
int n, addrs;
if (iface->in_addrs) {
addrs = n = how == IFACE_CLEAR_ALL ? 0 : 1;
for (; n < iface->in_addrs; n++)
iface_addr_Zap(iface->name, iface->in_addr + n);
@ -258,6 +259,7 @@ iface_inClear(struct iface *iface, int how)
iface->in_addrs = addrs;
/* Don't bother realloc()ing - we have little to gain */
}
}
int
iface_inAdd(struct iface *iface, struct in_addr ifa, struct in_addr mask,