svn commit: r341841 - stable/12/sys/netpfil/ipfw
Andrey V. Elsukov
ae at FreeBSD.org
Wed Dec 12 08:55:55 UTC 2018
Author: ae
Date: Wed Dec 12 08:55:54 2018
New Revision: 341841
URL: https://svnweb.freebsd.org/changeset/base/341841
Log:
MFC r341469:
Add assertion to check that named object has correct type.
Modified:
stable/12/sys/netpfil/ipfw/ip_fw_dynamic.c
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/sys/netpfil/ipfw/ip_fw_dynamic.c
==============================================================================
--- stable/12/sys/netpfil/ipfw/ip_fw_dynamic.c Wed Dec 12 05:48:27 2018 (r341840)
+++ stable/12/sys/netpfil/ipfw/ip_fw_dynamic.c Wed Dec 12 08:55:54 2018 (r341841)
@@ -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-all
mailing list