Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Sep 2017 01:47:54 +0000 (UTC)
From:      "Andrey V. Elsukov" <ae@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r324047 - stable/11/sys/netpfil/ipfw
Message-ID:  <201709270147.v8R1lsBT066969@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ae
Date: Wed Sep 27 01:47:54 2017
New Revision: 324047
URL: https://svnweb.freebsd.org/changeset/base/324047

Log:
  MFC r323839:
    Use in_localip() function instead of unlocked access to addresses hash
    to determine that an address is our local.
  
    PR:		220078

Modified:
  stable/11/sys/netpfil/ipfw/ip_fw2.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/netpfil/ipfw/ip_fw2.c
==============================================================================
--- stable/11/sys/netpfil/ipfw/ip_fw2.c	Wed Sep 27 01:46:14 2017	(r324046)
+++ stable/11/sys/netpfil/ipfw/ip_fw2.c	Wed Sep 27 01:47:54 2017	(r324047)
@@ -1609,10 +1609,7 @@ do {								\
 
 			case O_IP_SRC_ME:
 				if (is_ipv4) {
-					struct ifnet *tif;
-
-					INADDR_TO_IFP(src_ip, tif);
-					match = (tif != NULL);
+					match = in_localip(src_ip);
 					break;
 				}
 #ifdef INET6
@@ -1648,10 +1645,7 @@ do {								\
 
 			case O_IP_DST_ME:
 				if (is_ipv4) {
-					struct ifnet *tif;
-
-					INADDR_TO_IFP(dst_ip, tif);
-					match = (tif != NULL);
+					match = in_localip(dst_ip);
 					break;
 				}
 #ifdef INET6



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201709270147.v8R1lsBT066969>