diff options
author | glebius <glebius@FreeBSD.org> | 2011-11-19 19:06:08 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2011-11-19 19:06:08 +0000 |
commit | 8a4f05dc7cef04d12f90ae96a9968ec29062a773 (patch) | |
tree | b0037938317cb8af2314a00749f9dc2135dcdada | |
parent | fa09afd40854d77a65ec9873200b7baa27629790 (diff) | |
download | FreeBSD-src-8a4f05dc7cef04d12f90ae96a9968ec29062a773.zip FreeBSD-src-8a4f05dc7cef04d12f90ae96a9968ec29062a773.tar.gz |
For unknown reason, since rev 1.1 of ifconfig.c, sin_family isn't
set properly for the mask argument.
Since I'd like to improve argument sanity checking in kernel
side, in in_control(), fix this.
-rw-r--r-- | sbin/ifconfig/af_inet.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sbin/ifconfig/af_inet.c b/sbin/ifconfig/af_inet.c index 19e27c9..edb9b80 100644 --- a/sbin/ifconfig/af_inet.c +++ b/sbin/ifconfig/af_inet.c @@ -104,8 +104,7 @@ in_getaddr(const char *s, int which) struct netent *np; sin->sin_len = sizeof(*sin); - if (which != MASK) - sin->sin_family = AF_INET; + sin->sin_family = AF_INET; if (which == ADDR) { char *p = NULL; |