Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Jan 2016 18:20:40 +0000 (UTC)
From:      "Alexander V. Chernikov" <melifaro@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r294525 - head/sys/netpfil/ipfw
Message-ID:  <201601211820.u0LIKeBM030248@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: melifaro
Date: Thu Jan 21 18:20:40 2016
New Revision: 294525
URL: https://svnweb.freebsd.org/changeset/base/294525

Log:
  Fix panic on table/table entry delete. The panic could have happened
    if more than 64 distinct values had been used.
  
  Table value code uses internal objhash API which requires unique key
    for each object. For value code, pointer to the actual value data
    is used. The actual problem arises from the fact that 'actual' e.g.
    runtime data is stored in array and that array is auto-growing. There is
    special hook (update_tvalue() function) which is used to update the pointers
    after the change. For some reason, object 'key' was not updated.
    Fix this by adding update code to the update_tvalue().
  
  Sponsored by:	Yandex LLC

Modified:
  head/sys/netpfil/ipfw/ip_fw_table_value.c

Modified: head/sys/netpfil/ipfw/ip_fw_table_value.c
==============================================================================
--- head/sys/netpfil/ipfw/ip_fw_table_value.c	Thu Jan 21 18:19:33 2016	(r294524)
+++ head/sys/netpfil/ipfw/ip_fw_table_value.c	Thu Jan 21 18:20:40 2016	(r294525)
@@ -158,6 +158,7 @@ update_tvalue(struct namedobj_instance *
 
 	pval = da->pval;
 	ptv->pval = &pval[ptv->no.kidx];
+	ptv->no.name = (char *)&pval[ptv->no.kidx];
 
 }
 



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