From owner-svn-src-stable-9@FreeBSD.ORG Sat Jul 28 21:43:30 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3FD08106566C; Sat, 28 Jul 2012 21:43:30 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2A30B8FC16; Sat, 28 Jul 2012 21:43:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6SLhUMn070835; Sat, 28 Jul 2012 21:43:30 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6SLhTi7070833; Sat, 28 Jul 2012 21:43:29 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201207282143.q6SLhTi7070833@svn.freebsd.org> From: Hiroki Sato Date: Sat, 28 Jul 2012 21:43:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238872 - stable/9/sbin/ifconfig X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Jul 2012 21:43:30 -0000 Author: hrs Date: Sat Jul 28 21:43:29 2012 New Revision: 238872 URL: http://svn.freebsd.org/changeset/base/238872 Log: MFC r235285: Skip nd6 line with no warning message when the system does not support INET6. Spotted by: flo Approved by: re (kib) Modified: stable/9/sbin/ifconfig/af_nd6.c Directory Properties: stable/9/sbin/ifconfig/ (props changed) Modified: stable/9/sbin/ifconfig/af_nd6.c ============================================================================== --- stable/9/sbin/ifconfig/af_nd6.c Sat Jul 28 20:31:39 2012 (r238871) +++ stable/9/sbin/ifconfig/af_nd6.c Sat Jul 28 21:43:29 2012 (r238872) @@ -148,12 +148,14 @@ nd6_status(int s) memset(&nd, 0, sizeof(nd)); strncpy(nd.ifname, ifr.ifr_name, sizeof(nd.ifname)); if ((s6 = socket(AF_INET6, SOCK_DGRAM, 0)) < 0) { - warn("socket(AF_INET6, SOCK_DGRAM)"); + if (errno != EPROTONOSUPPORT) + warn("socket(AF_INET6, SOCK_DGRAM)"); return; } error = ioctl(s6, SIOCGIFINFO_IN6, &nd); if (error) { - warn("ioctl(SIOCGIFINFO_IN6)"); + if (errno != EPFNOSUPPORT) + warn("ioctl(SIOCGIFINFO_IN6)"); close(s6); return; }