svn commit: r293625 - head/sys/netpfil/ipfw
Alexander V. Chernikov
melifaro at FreeBSD.org
Sun Jan 10 00:28:45 UTC 2016
Author: melifaro
Date: Sun Jan 10 00:28:44 2016
New Revision: 293625
URL: https://svnweb.freebsd.org/changeset/base/293625
Log:
Use already pre-calculated number of entries instead of tc->count.
Modified:
head/sys/netpfil/ipfw/ip_fw_table.c
Modified: head/sys/netpfil/ipfw/ip_fw_table.c
==============================================================================
--- head/sys/netpfil/ipfw/ip_fw_table.c Sun Jan 10 00:01:03 2016 (r293624)
+++ head/sys/netpfil/ipfw/ip_fw_table.c Sun Jan 10 00:28:44 2016 (r293625)
@@ -2097,7 +2097,7 @@ export_table_info(struct ip_fw_chain *ch
i->count = table_get_count(ch, tc);
i->limit = tc->limit;
i->flags |= (tc->locked != 0) ? IPFW_TGFLAGS_LOCKED : 0;
- i->size = tc->count * sizeof(ipfw_obj_tentry);
+ i->size = i->count * sizeof(ipfw_obj_tentry);
i->size += sizeof(ipfw_obj_header) + sizeof(ipfw_xtable_info);
strlcpy(i->tablename, tc->tablename, sizeof(i->tablename));
ti = KIDX_TO_TI(ch, tc->no.kidx);
More information about the svn-src-all
mailing list