Use already pre-calculated number of entries instead of tc->count.

This commit is contained in:
Alexander V. Chernikov 2016-01-10 00:28:44 +00:00
parent 8084a52400
commit 3673828490
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=293625

View File

@ -2097,7 +2097,7 @@ export_table_info(struct ip_fw_chain *ch, struct table_config *tc,
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);