Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Dec 2018 08:59:06 +0000 (UTC)
From:      "Andrey V. Elsukov" <ae@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r341842 - stable/11/sys/netpfil/ipfw
Message-ID:  <201812120859.wBC8x6Lq065408@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ae
Date: Wed Dec 12 08:59:06 2018
New Revision: 341842
URL: https://svnweb.freebsd.org/changeset/base/341842

Log:
  MFC r341469:
    Add assertion to check that named object has correct type.

Modified:
  stable/11/sys/netpfil/ipfw/ip_fw_dynamic.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/netpfil/ipfw/ip_fw_dynamic.c
==============================================================================
--- stable/11/sys/netpfil/ipfw/ip_fw_dynamic.c	Wed Dec 12 08:55:54 2018	(r341841)
+++ stable/11/sys/netpfil/ipfw/ip_fw_dynamic.c	Wed Dec 12 08:59:06 2018	(r341842)
@@ -707,6 +707,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));



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201812120859.wBC8x6Lq065408>