From owner-svn-src-stable-7@FreeBSD.ORG Thu Nov 25 21:42:37 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0ABCE1065696; Thu, 25 Nov 2010 21:42:37 +0000 (UTC) (envelope-from brian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EC0B48FC15; Thu, 25 Nov 2010 21:42:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAPLgaU5018360; Thu, 25 Nov 2010 21:42:36 GMT (envelope-from brian@svn.freebsd.org) Received: (from brian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAPLgaTS018358; Thu, 25 Nov 2010 21:42:36 GMT (envelope-from brian@svn.freebsd.org) Message-Id: <201011252142.oAPLgaTS018358@svn.freebsd.org> From: Brian Somers Date: Thu, 25 Nov 2010 21:42:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215842 - stable/7/sbin/natd X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Nov 2010 21:42:37 -0000 Author: brian Date: Thu Nov 25 21:42:36 2010 New Revision: 215842 URL: http://svn.freebsd.org/changeset/base/215842 Log: MF8: Don't abend if we get ENOMEM from sysctl(3). The data returned is sufficient Modified: stable/7/sbin/natd/natd.c Directory Properties: stable/7/sbin/natd/ (props changed) Modified: stable/7/sbin/natd/natd.c ============================================================================== --- stable/7/sbin/natd/natd.c Thu Nov 25 20:35:49 2010 (r215841) +++ stable/7/sbin/natd/natd.c Thu Nov 25 21:42:36 2010 (r215842) @@ -885,7 +885,7 @@ SetAliasAddressFromIfName(const char *if err(1, "iflist-sysctl-estimate"); if ((buf = malloc(needed)) == NULL) errx(1, "malloc failed"); - if (sysctl(mib, 6, buf, &needed, NULL, 0) == -1) + if (sysctl(mib, 6, buf, &needed, NULL, 0) == -1 && errno != ENOMEM) err(1, "iflist-sysctl-get"); lim = buf + needed; /*