summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_fw2.c
diff options
context:
space:
mode:
authorandre <andre@FreeBSD.org>2004-08-11 11:41:11 +0000
committerandre <andre@FreeBSD.org>2004-08-11 11:41:11 +0000
commit957506e985495914d7245b3e8a1b3b77ef63e200 (patch)
tree2fb0281a51239a2ce406a86f4470ccb5a014a033 /sys/netinet/ip_fw2.c
parentdd8a1c6e2a5776b90285d07d2673b2e787b8667b (diff)
downloadFreeBSD-src-957506e985495914d7245b3e8a1b3b77ef63e200.zip
FreeBSD-src-957506e985495914d7245b3e8a1b3b77ef63e200.tar.gz
Only invoke verify_path() for verrevpath and versrcreach when we have an IP packet.
Diffstat (limited to 'sys/netinet/ip_fw2.c')
-rw-r--r--sys/netinet/ip_fw2.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/netinet/ip_fw2.c b/sys/netinet/ip_fw2.c
index 30e6309..7333f68 100644
--- a/sys/netinet/ip_fw2.c
+++ b/sys/netinet/ip_fw2.c
@@ -2200,15 +2200,15 @@ check_body:
case O_VERREVPATH:
/* Outgoing packets automatically pass/match */
- match = ((oif != NULL) ||
+ match = (hlen > 0 && ((oif != NULL) ||
(m->m_pkthdr.rcvif == NULL) ||
- verify_path(src_ip, m->m_pkthdr.rcvif));
+ verify_path(src_ip, m->m_pkthdr.rcvif)));
break;
case O_VERSRCREACH:
/* Outgoing packets automatically pass/match */
- match = ((oif != NULL) ||
- verify_path(src_ip, NULL));
+ match = (hlen > 0 && ((oif != NULL) ||
+ verify_path(src_ip, NULL)));
break;
case O_ANTISPOOF:
OpenPOWER on IntegriCloud