From 84b0fe8197b6cd78924192df8a1849ce06798e6b Mon Sep 17 00:00:00 2001 From: Brian Somers Date: Mon, 20 Aug 2001 11:06:21 +0000 Subject: [PATCH] Properly change old interface addresses so that their destination is 255.255.255.255 if our new destination address conflicts. --- usr.sbin/ppp/iface.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr.sbin/ppp/iface.c b/usr.sbin/ppp/iface.c index 586d3d27379..8375663b5ac 100644 --- a/usr.sbin/ppp/iface.c +++ b/usr.sbin/ppp/iface.c @@ -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; */