From owner-cvs-src-old@FreeBSD.ORG Wed Apr 28 00:54:24 2010 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B064106564A for ; Wed, 28 Apr 2010 00:54:24 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 6A7C48FC1C for ; Wed, 28 Apr 2010 00:54:24 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o3S0sOSD017945 for ; Wed, 28 Apr 2010 00:54:24 GMT (envelope-from delphij@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o3S0sOmI017944 for cvs-src-old@freebsd.org; Wed, 28 Apr 2010 00:54:24 GMT (envelope-from delphij@repoman.freebsd.org) Message-Id: <201004280054.o3S0sOmI017944@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to delphij@repoman.freebsd.org using -f From: Xin LI Date: Wed, 28 Apr 2010 00:49:24 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: RELENG_8 Subject: cvs commit: src/sbin/ifconfig ifconfig.c src/share/man/man4 netintro.4 src/sys/net if.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Apr 2010 00:54:24 -0000 delphij 2010-04-28 00:49:24 UTC FreeBSD src repository Modified files: (Branch: RELENG_8) sbin/ifconfig ifconfig.c share/man/man4 netintro.4 sys/net if.c Log: SVN rev 207304 on 2010-04-28 00:49:24Z by delphij MFC r206637: When an underlying ioctl(2) handler returns an error, our ioctl(2) interface considers that it hits a fatal error, and will not copyout the request structure back for _IOW and _IOWR ioctls, keeping them untouched. The previous implementation of the SIOCGIFDESCR ioctl intends to feed the buffer length back to userland. However, if we return an error, the feedback would be defeated and ifconfig(8) would trap into an infinite loop. This commit changes SIOCGIFDESCR to set buffer field to NULL to indicate the previous ENAMETOOLONG case. Reported by: bschmidt Revision Changes Path 1.146.2.5 +12 -11 src/sbin/ifconfig/ifconfig.c 1.25.30.3 +6 -3 src/share/man/man4/netintro.4 1.359.2.19 +3 -4 src/sys/net/if.c