From owner-svn-src-stable-7@FreeBSD.ORG Thu Oct 30 15:56:05 2008 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 5156F106567D; Thu, 30 Oct 2008 15:56:05 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3F2078FC1C; Thu, 30 Oct 2008 15:56:05 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9UFu5R4055398; Thu, 30 Oct 2008 15:56:05 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9UFu4SM055397; Thu, 30 Oct 2008 15:56:04 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200810301556.m9UFu4SM055397@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 30 Oct 2008 15:56:04 +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: r184475 - in stable/7/sys: . net 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, 30 Oct 2008 15:56:05 -0000 Author: bz Date: Thu Oct 30 15:56:04 2008 New Revision: 184475 URL: http://svn.freebsd.org/changeset/base/184475 Log: MFC: r182106 Make the checks for ptp interfaces in ifa_ifwithdstaddr() and ifa_ifwithnet() look more similar by comparing the pointer to NULL in both cases. Approved by: re (gnn) Modified: stable/7/sys/ (props changed) stable/7/sys/net/if.c Modified: stable/7/sys/net/if.c ============================================================================== --- stable/7/sys/net/if.c Thu Oct 30 15:48:55 2008 (r184474) +++ stable/7/sys/net/if.c Thu Oct 30 15:56:04 2008 (r184475) @@ -1172,7 +1172,7 @@ ifa_ifwithdstaddr(struct sockaddr *addr) TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { if (ifa->ifa_addr->sa_family != addr->sa_family) continue; - if (ifa->ifa_dstaddr && + if (ifa->ifa_dstaddr != NULL && sa_equal(addr, ifa->ifa_dstaddr)) goto done; } @@ -1226,7 +1226,7 @@ next: continue; * The trouble is that we don't know the * netmask for the remote end. */ - if (ifa->ifa_dstaddr != 0 && + if (ifa->ifa_dstaddr != NULL && sa_equal(addr, ifa->ifa_dstaddr)) goto done; } else {