diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2015-11-23 17:53:53 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2015-11-23 17:53:53 +0000 |
commit | 5244f1a4ce1ee438e50ffed9dea2efaccfbaa316 (patch) | |
tree | 31c0b08d36bc7b064433fe0e0bcc3012054f52ce /sbin | |
parent | 5d167165f8fa936bec3cd0008ebc77816b6537bb (diff) |
Revert previous it introduces a regression found by krw@
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/ifconfig/ifconfig.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c index bf01953a010..693144fa77b 100644 --- a/sbin/ifconfig/ifconfig.c +++ b/sbin/ifconfig/ifconfig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ifconfig.c,v 1.305 2015/11/23 10:33:23 mpi Exp $ */ +/* $OpenBSD: ifconfig.c,v 1.306 2015/11/23 17:53:52 mpi Exp $ */ /* $NetBSD: ifconfig.c,v 1.40 1997/10/01 02:19:43 enami Exp $ */ /* @@ -789,6 +789,7 @@ nextarg: * it is not specified. */ setifprefixlen("64", 0); + /* in6_getprefix("64", MASK) if MASK is available here... */ } if (clearaddr) { @@ -1137,14 +1138,11 @@ setifaddr(const char *addr, int param) * and the flags may change when the address is set. */ setaddr++; - if (doalias >= 0) { + if (doalias >= 0) newaddr = 1; - afp->af_getaddr(addr, ADDR); - } - if (doalias == 0) { + if (doalias == 0) clearaddr = 1; - afp->af_getaddr(addr, RIDADDR); - } + afp->af_getaddr(addr, (doalias >= 0 ? ADDR : RIDADDR)); } #ifndef SMALL |