From owner-svn-src-head@FreeBSD.ORG Sun Jan 3 06:43:13 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A5E11065679; Sun, 3 Jan 2010 06:43:13 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 694E18FC15; Sun, 3 Jan 2010 06:43:13 +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 o036hDGu092254; Sun, 3 Jan 2010 06:43:13 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o036hDQ6092252; Sun, 3 Jan 2010 06:43:13 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201001030643.o036hDQ6092252@svn.freebsd.org> From: Navdeep Parhar Date: Sun, 3 Jan 2010 06:43:13 +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: r201416 - head/sys/netinet 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: Sun, 03 Jan 2010 06:43:13 -0000 Author: np Date: Sun Jan 3 06:43:13 2010 New Revision: 201416 URL: http://svn.freebsd.org/changeset/base/201416 Log: Avoid NULL dereference in arpresolve. Modified: head/sys/netinet/if_ether.c Modified: head/sys/netinet/if_ether.c ============================================================================== --- head/sys/netinet/if_ether.c Sun Jan 3 04:38:38 2010 (r201415) +++ head/sys/netinet/if_ether.c Sun Jan 3 06:43:13 2010 (r201416) @@ -372,8 +372,8 @@ retry: if (la->la_asked < V_arp_maxtries) error = EWOULDBLOCK; /* First request. */ else - error = - (rt0->rt_flags & RTF_GATEWAY) ? EHOSTUNREACH : EHOSTDOWN; + error = rt0 != NULL && (rt0->rt_flags & RTF_GATEWAY) ? + EHOSTUNREACH : EHOSTDOWN; if (renew) { LLE_ADDREF(la);