summaryrefslogtreecommitdiffstats
path: root/sbin/ifconfig
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2011-12-16 13:30:17 +0000
committerglebius <glebius@FreeBSD.org>2011-12-16 13:30:17 +0000
commit25d9ab0f4e4a6108eb3bfaa60a6628b05cbc4d75 (patch)
tree8d11761f782eede94201a57f3a547df26aefbdae /sbin/ifconfig
parenta1d123baf1a614eebf691a448c57e66558090ddc (diff)
downloadFreeBSD-src-25d9ab0f4e4a6108eb3bfaa60a6628b05cbc4d75.zip
FreeBSD-src-25d9ab0f4e4a6108eb3bfaa60a6628b05cbc4d75.tar.gz
Since size of struct in_aliasreq has just been changed in r228571,
and thus ifconfig(8) needs recompile, it is a good chance to make parameter checks on SIOCAIFADDR arguments more strict.
Diffstat (limited to 'sbin/ifconfig')
-rw-r--r--sbin/ifconfig/af_inet.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sbin/ifconfig/af_inet.c b/sbin/ifconfig/af_inet.c
index bcd17c4..c733373 100644
--- a/sbin/ifconfig/af_inet.c
+++ b/sbin/ifconfig/af_inet.c
@@ -126,6 +126,7 @@ in_getaddr(const char *s, int which)
*p = '/';
errx(1, "%s: bad value (width %s)", s, errstr);
}
+ min->sin_family = AF_INET;
min->sin_len = sizeof(*min);
min->sin_addr.s_addr = htonl(~((1LL << (32 - masklen)) - 1) &
0xffffffff);
OpenPOWER on IntegriCloud