diff options
author | ae <ae@FreeBSD.org> | 2017-09-27 01:47:54 +0000 |
---|---|---|
committer | ae <ae@FreeBSD.org> | 2017-09-27 01:47:54 +0000 |
commit | 95e0ec693530205c3ae4f03f3a134af5be6656d0 (patch) | |
tree | 8619fa6d16ebfbf61f2626ec021bf799cda807cd | |
parent | 63762f8bdea07336c5ec3e4e06281313d475cec9 (diff) | |
download | FreeBSD-src-95e0ec693530205c3ae4f03f3a134af5be6656d0.zip FreeBSD-src-95e0ec693530205c3ae4f03f3a134af5be6656d0.tar.gz |
MFC r323839:
Use in_localip() function instead of unlocked access to addresses hash
to determine that an address is our local.
PR: 220078
-rw-r--r-- | sys/netpfil/ipfw/ip_fw2.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/sys/netpfil/ipfw/ip_fw2.c b/sys/netpfil/ipfw/ip_fw2.c index a32261d..5464e59 100644 --- a/sys/netpfil/ipfw/ip_fw2.c +++ b/sys/netpfil/ipfw/ip_fw2.c @@ -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 |