svn commit: r257762 - stable/9/sbin/ifconfig

Gleb Smirnoff glebius at FreeBSD.org
Wed Nov 6 19:47:23 UTC 2013


Author: glebius
Date: Wed Nov  6 19:47:23 2013
New Revision: 257762
URL: http://svnweb.freebsd.org/changeset/base/257762

Log:
  Merge r227738, r228574:
    Fill in sin_family in ioctl() arguments.

Modified:
  stable/9/sbin/ifconfig/af_inet.c
Directory Properties:
  stable/9/sbin/ifconfig/   (props changed)

Modified: stable/9/sbin/ifconfig/af_inet.c
==============================================================================
--- stable/9/sbin/ifconfig/af_inet.c	Wed Nov  6 19:46:20 2013	(r257761)
+++ stable/9/sbin/ifconfig/af_inet.c	Wed Nov  6 19:47:23 2013	(r257762)
@@ -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;
@@ -124,6 +123,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);


More information about the svn-src-stable-9 mailing list