Date: Thu, 30 Oct 2008 15:56:04 +0000 (UTC) From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r184475 - in stable/7/sys: . net Message-ID: <200810301556.m9UFu4SM055397@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200810301556.m9UFu4SM055397>