-/* $OpenBSD: ipsec_input.c,v 1.183 2021/10/13 22:43:44 bluhm Exp $ */
+/* $OpenBSD: ipsec_input.c,v 1.184 2021/10/13 22:49:11 bluhm Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
* Angelos D. Keromytis (kermit@csd.uch.gr) and
ipsecstat_pkt(ipsec_ipackets, ipsec_ibytes, m->m_pkthdr.len);
IPSEC_ISTAT(esps_input, ahs_input, ipcomps_input);
- if (m == NULL) {
- DPRINTF("NULL packet received");
- IPSEC_ISTAT(esps_hdrops, ahs_hdrops, ipcomps_hdrops);
- return EINVAL;
- }
-
if ((sproto == IPPROTO_IPCOMP) && (m->m_flags & M_COMP)) {
DPRINTF("repeated decompression");
ipcompstat_inc(ipcomps_pdrops);
tdbp->tdb_last_used = gettime();
- /* Sanity check */
- if (m == NULL) {
- /* The called routine will print a message if necessary */
- IPSEC_ISTAT(esps_badkcr, ahs_badkcr, ipcomps_badkcr);
- return -1;
- }
-
/* Fix IPv4 header */
if (af == AF_INET) {
if ((m->m_len < skip) && ((m = m_pullup(m, skip)) == NULL)) {