Use already pre-calculated number of entries instead of tc->count.
This commit is contained in:
parent
8084a52400
commit
3673828490
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=293625
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user