Date: Wed, 3 Jul 2013 11:23:07 +0200 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= <uqs@FreeBSD.org> To: Hiroki Sato <hrs@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r252408 - head/sbin/ifconfig Message-ID: <20130703092307.GA2294@acme.spoerlein.net> In-Reply-To: <201306300737.r5U7bWkB096070@svn.freebsd.org> References: <201306300737.r5U7bWkB096070@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 2013-06-30 at 07:37:32 +0000, Hiroki Sato wrote: > Author: hrs > Date: Sun Jun 30 07:37:31 2013 > New Revision: 252408 > URL: http://svnweb.freebsd.org/changeset/base/252408 > > Log: > Do not display a warning message in a jail without AF_INET6 support. > > MFC after: 3 days > > Modified: > head/sbin/ifconfig/af_nd6.c > > Modified: head/sbin/ifconfig/af_nd6.c > ============================================================================== > --- head/sbin/ifconfig/af_nd6.c Sun Jun 30 06:44:31 2013 (r252407) > +++ head/sbin/ifconfig/af_nd6.c Sun Jun 30 07:37:31 2013 (r252408) > @@ -148,7 +148,7 @@ 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) { > - if (errno != EAFNOSUPPORT) > + if (errno != EAFNOSUPPORT && error != EPROTONOSUPPORT) > warn("socket(AF_INET6, SOCK_DGRAM)"); > return; > } This gives undefined behavior, error is uninitialized at this point. Found by: Coverity Scan, CID 1042128 Cheers, Uli
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130703092307.GA2294>