From owner-svn-src-all@FreeBSD.ORG Wed Nov 6 19:47:23 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C278067D; Wed, 6 Nov 2013 19:47:23 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AFB2528D3; Wed, 6 Nov 2013 19:47:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA6JlN3U018105; Wed, 6 Nov 2013 19:47:23 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA6JlNNL018104; Wed, 6 Nov 2013 19:47:23 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201311061947.rA6JlNNL018104@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 6 Nov 2013 19:47:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r257762 - stable/9/sbin/ifconfig X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Nov 2013 19:47:23 -0000 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);