From owner-svn-src-head@FreeBSD.ORG Fri May 11 20:01:45 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CA369106568B; Fri, 11 May 2012 20:01:45 +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 B66468FC14; Fri, 11 May 2012 20:01:45 +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 q4BK1jFI098255; Fri, 11 May 2012 20:01:45 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4BK1jXj098253; Fri, 11 May 2012 20:01:45 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201205112001.q4BK1jXj098253@svn.freebsd.org> From: Hiroki Sato Date: Fri, 11 May 2012 20:01:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235285 - head/sbin/ifconfig X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2012 20:01:45 -0000 Author: hrs Date: Fri May 11 20:01:45 2012 New Revision: 235285 URL: http://svn.freebsd.org/changeset/base/235285 Log: Skip nd6 line with no warning message when the system does not support INET6. Spotted by: flo Modified: head/sbin/ifconfig/af_nd6.c Modified: head/sbin/ifconfig/af_nd6.c ============================================================================== --- head/sbin/ifconfig/af_nd6.c Fri May 11 19:26:54 2012 (r235284) +++ head/sbin/ifconfig/af_nd6.c Fri May 11 20:01:45 2012 (r235285) @@ -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; }