svn commit: r305122 - head/sys/netipsec
Andrey V. Elsukov
ae at FreeBSD.org
Wed Aug 31 11:51:53 UTC 2016
Author: ae
Date: Wed Aug 31 11:51:52 2016
New Revision: 305122
URL: https://svnweb.freebsd.org/changeset/base/305122
Log:
Remove redundant sanity checks from ipsec[46]_common_input_cb().
This check already has been done in the each protocol callback.
Modified:
head/sys/netipsec/ipsec_input.c
Modified: head/sys/netipsec/ipsec_input.c
==============================================================================
--- head/sys/netipsec/ipsec_input.c Wed Aug 31 11:10:39 2016 (r305121)
+++ head/sys/netipsec/ipsec_input.c Wed Aug 31 11:51:52 2016 (r305122)
@@ -334,14 +334,6 @@ ipsec4_common_input_cb(struct mbuf *m, s
sproto == IPPROTO_IPCOMP,
("unexpected security protocol %u", sproto));
- /* Sanity check */
- if (m == NULL) {
- DPRINTF(("%s: null mbuf", __func__));
- IPSEC_ISTAT(sproto, badkcr);
- KEY_FREESAV(&sav);
- return EINVAL;
- }
-
if (skip != 0) {
/*
* Fix IPv4 header
@@ -615,14 +607,6 @@ ipsec6_common_input_cb(struct mbuf *m, s
sproto == IPPROTO_IPCOMP,
("unexpected security protocol %u", sproto));
- /* Sanity check */
- if (m == NULL) {
- DPRINTF(("%s: null mbuf", __func__));
- IPSEC_ISTAT(sproto, badkcr);
- error = EINVAL;
- goto bad;
- }
-
/* Fix IPv6 header */
if (m->m_len < sizeof(struct ip6_hdr) &&
(m = m_pullup(m, sizeof(struct ip6_hdr))) == NULL) {
More information about the svn-src-head
mailing list