svn commit: r341469 - head/sys/netpfil/ipfw
Andrey V. Elsukov
ae at FreeBSD.org
Tue Dec 4 15:12:29 UTC 2018
Author: ae
Date: Tue Dec 4 15:12:28 2018
New Revision: 341469
URL: https://svnweb.freebsd.org/changeset/base/341469
Log:
Add assertion to check that named object has correct type.
Obtained from: Yandex LLC
MFC after: 1 week
Modified:
head/sys/netpfil/ipfw/ip_fw_dynamic.c
Modified: head/sys/netpfil/ipfw/ip_fw_dynamic.c
==============================================================================
--- head/sys/netpfil/ipfw/ip_fw_dynamic.c Tue Dec 4 15:06:24 2018 (r341468)
+++ head/sys/netpfil/ipfw/ip_fw_dynamic.c Tue Dec 4 15:12:28 2018 (r341469)
@@ -708,6 +708,8 @@ dyn_destroy(struct ip_fw_chain *ch, struct named_objec
IPFW_UH_WLOCK_ASSERT(ch);
+ KASSERT(no->etlv == IPFW_TLV_STATE_NAME,
+ ("%s: wrong object type %u", __func__, no->etlv));
KASSERT(no->refcnt == 1,
("Destroying object '%s' (type %u, idx %u) with refcnt %u",
no->name, no->etlv, no->kidx, no->refcnt));
More information about the svn-src-head
mailing list