diff options
author | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2002-04-26 04:40:43 +0000 |
---|---|---|
committer | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2002-04-26 04:40:43 +0000 |
commit | bb55709bdbaf263eac7b3cf9aa305d66f1be268b (patch) | |
tree | dd5a5cd0ca1d501421e734d43e355f77a2b40bab /sbin/ifconfig/ifconfig.c | |
parent | 7a73406f17db7b8a068e2dad70e7c2074842bf79 (diff) |
use struct in_aliasreq instead of ifaliasreq when setting new inet
address. solves a sigbus error seen on sparc64 with new binutils.
from itojun@
Diffstat (limited to 'sbin/ifconfig/ifconfig.c')
-rw-r--r-- | sbin/ifconfig/ifconfig.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c index 10bab3dddbb..1258db3e501 100644 --- a/sbin/ifconfig/ifconfig.c +++ b/sbin/ifconfig/ifconfig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ifconfig.c,v 1.62 2002/04/25 08:55:16 itojun Exp $ */ +/* $OpenBSD: ifconfig.c,v 1.63 2002/04/26 04:40:42 fgsch Exp $ */ /* $NetBSD: ifconfig.c,v 1.40 1997/10/01 02:19:43 enami Exp $ */ /* @@ -81,7 +81,7 @@ static const char copyright[] = #if 0 static const char sccsid[] = "@(#)ifconfig.c 8.2 (Berkeley) 2/16/94"; #else -static const char rcsid[] = "$OpenBSD: ifconfig.c,v 1.62 2002/04/25 08:55:16 itojun Exp $"; +static const char rcsid[] = "$OpenBSD: ifconfig.c,v 1.63 2002/04/26 04:40:42 fgsch Exp $"; #endif #endif /* not lint */ @@ -135,6 +135,7 @@ static const char rcsid[] = "$OpenBSD: ifconfig.c,v 1.62 2002/04/25 08:55:16 ito struct ifreq ifr, ridreq; struct ifaliasreq addreq; +struct in_aliasreq in_addreq; #ifdef INET6 struct in6_ifreq ifr6; struct in6_ifreq in6_ridreq; @@ -357,7 +358,7 @@ const struct afswtch { } afs[] = { #define C(x) ((caddr_t) &x) { "inet", AF_INET, in_status, in_getaddr, in_getprefix, - SIOCDIFADDR, SIOCAIFADDR, C(ridreq), C(addreq) }, + SIOCDIFADDR, SIOCAIFADDR, C(ridreq), C(in_addreq) }, #ifdef INET6 { "inet6", AF_INET6, in6_status, in6_getaddr, in6_getprefix, SIOCDIFADDR_IN6, SIOCAIFADDR_IN6, C(in6_ridreq), C(in6_addreq) }, @@ -2178,8 +2179,8 @@ struct in_addr inet_makeaddr(); #define SIN(x) ((struct sockaddr_in *) &(x)) struct sockaddr_in *sintab[] = { -SIN(ridreq.ifr_addr), SIN(addreq.ifra_addr), -SIN(addreq.ifra_mask), SIN(addreq.ifra_broadaddr)}; +SIN(ridreq.ifr_addr), SIN(in_addreq.ifra_addr), +SIN(in_addreq.ifra_mask), SIN(in_addreq.ifra_broadaddr)}; void in_getaddr(s, which) |