summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/iface.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>2001-08-20 11:06:21 +0000
committerbrian <brian@FreeBSD.org>2001-08-20 11:06:21 +0000
commit7ac94dd0fbb990675214c8e4a267b5a3f597f707 (patch)
tree5c4013e17bd8287a94fb13b572b8b1d2a270ab3d /usr.sbin/ppp/iface.c
parentc400ea8f0ca0851ba87d9c155f3b411528c0e614 (diff)
downloadFreeBSD-src-7ac94dd0fbb990675214c8e4a267b5a3f597f707.zip
FreeBSD-src-7ac94dd0fbb990675214c8e4a267b5a3f597f707.tar.gz
Properly change old interface addresses so that their destination is
255.255.255.255 if our new destination address conflicts.
Diffstat (limited to 'usr.sbin/ppp/iface.c')
-rw-r--r--usr.sbin/ppp/iface.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/ppp/iface.c b/usr.sbin/ppp/iface.c
index 586d3d2..8375663 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; */
OpenPOWER on IntegriCloud