1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-14 10:09:48 +00:00

Properly change old interface addresses so that their destination is

255.255.255.255 if our new destination address conflicts.
This commit is contained in:
Brian Somers 2001-08-20 11:06:21 +00:00
parent 428217f76c
commit 84b0fe8197
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=81959

View File

@ -421,7 +421,8 @@ iface_Add(struct iface *iface, struct ncp *ncp, const struct ncprange *ifa,
ncprange_getaddr(ifa, &ncplocal);
for (n = 0; n < iface->addrs; n++) {
if (ncprange_contains(&iface->addr[n].ifa, &ncplocal)) {
if (ncprange_contains(&iface->addr[n].ifa, &ncplocal) ||
ncpaddr_equal(&iface->addr[n].peer, peer)) {
if (!(how & IFACE_FORCE_ADD)) {
close(s);
return 0; /* errno = EEXIST; */