diff options
author | glebius <glebius@FreeBSD.org> | 2012-10-06 07:06:57 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2012-10-06 07:06:57 +0000 |
commit | 30f3c300d8d28e84a49c574e8bd0db454de92910 (patch) | |
tree | 0b0ef102fb0e3e4c7008c6799ad83361c3845dab /sys/netpfil | |
parent | 4bef41973f7c4df239c272abad1ccd84679efeb4 (diff) | |
download | FreeBSD-src-30f3c300d8d28e84a49c574e8bd0db454de92910.zip FreeBSD-src-30f3c300d8d28e84a49c574e8bd0db454de92910.tar.gz |
The pfil(9) layer guarantees us presence of the protocol header,
so remove extra check, that is always false.
P.S. Also, goto there lead to unlocking a not locked rwlock.
Diffstat (limited to 'sys/netpfil')
-rw-r--r-- | sys/netpfil/pf/pf.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 0eacc5a..00150f3 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -5620,13 +5620,6 @@ pf_test(int dir, struct ifnet *ifp, struct mbuf **m0, struct inpcb *inp) if (m->m_flags & M_SKIP_FIREWALL) return (PF_PASS); - if (m->m_pkthdr.len < (int)sizeof(struct ip)) { - action = PF_DROP; - REASON_SET(&reason, PFRES_SHORT); - log = 1; - goto done; - } - pd.pf_mtag = pf_find_mtag(m); PF_RULES_RLOCK(); @@ -5992,13 +5985,6 @@ pf_test6(int dir, struct ifnet *ifp, struct mbuf **m0, struct inpcb *inp) if (kif->pfik_flags & PFI_IFLAG_SKIP) return (PF_PASS); - if (m->m_pkthdr.len < (int)sizeof(*h)) { - action = PF_DROP; - REASON_SET(&reason, PFRES_SHORT); - log = 1; - goto done; - } - PF_RULES_RLOCK(); /* We do IP header normalization and packet reassembly here */ |