diff options
author | brian <brian@cvs.openbsd.org> | 2001-08-21 04:09:20 +0000 |
---|---|---|
committer | brian <brian@cvs.openbsd.org> | 2001-08-21 04:09:20 +0000 |
commit | 60a433e10040bb959397a4bb1cf1daeabcb3182c (patch) | |
tree | ad20a8f27b768864c617d4547da4b95939766d2c /usr.sbin/ppp | |
parent | b5155ca0f3a2c0338923fe8ddf0f4aaee8deacb5 (diff) |
Treat an interface address as conflicting if it's destination address
matches any existing destination addresses on the interface. This
unbreaks ``enable iface-alias''.
Diffstat (limited to 'usr.sbin/ppp')
-rw-r--r-- | usr.sbin/ppp/ppp/iface.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/ppp/ppp/iface.c b/usr.sbin/ppp/ppp/iface.c index 0f5add19f5d..90a89c66d83 100644 --- a/usr.sbin/ppp/ppp/iface.c +++ b/usr.sbin/ppp/ppp/iface.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $OpenBSD: iface.c,v 1.18 2001/08/19 23:22:17 brian Exp $ + * $OpenBSD: iface.c,v 1.19 2001/08/21 04:09:19 brian Exp $ */ #include <sys/param.h> @@ -423,7 +423,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; */ |