Use IPFW_RULE_CNTR_SIZE macro instead of non-relevant ip_fw_cntr structure.
Found by: luigi
This commit is contained in:
parent
4cc7d0982c
commit
0d90989bef
@ -226,12 +226,6 @@ VNET_DECLARE(unsigned int, fw_tables_sets);
|
|||||||
struct tables_config;
|
struct tables_config;
|
||||||
|
|
||||||
#ifdef _KERNEL
|
#ifdef _KERNEL
|
||||||
typedef struct ip_fw_cntr {
|
|
||||||
uint64_t pcnt; /* Packet counter */
|
|
||||||
uint64_t bcnt; /* Byte counter */
|
|
||||||
uint64_t timestamp; /* tv_sec of last match */
|
|
||||||
} ip_fw_cntr;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Here we have the structure representing an ipfw rule.
|
* Here we have the structure representing an ipfw rule.
|
||||||
*
|
*
|
||||||
@ -261,6 +255,8 @@ struct ip_fw {
|
|||||||
ipfw_insn cmd[1]; /* storage for commands */
|
ipfw_insn cmd[1]; /* storage for commands */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define IPFW_RULE_CNTR_SIZE (2 * sizeof(counter_u64_t))
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct ip_fw_chain {
|
struct ip_fw_chain {
|
||||||
|
@ -162,7 +162,7 @@ ipfw_init_counters()
|
|||||||
{
|
{
|
||||||
|
|
||||||
V_ipfw_cntr_zone = uma_zcreate("IPFW counters",
|
V_ipfw_cntr_zone = uma_zcreate("IPFW counters",
|
||||||
sizeof(ip_fw_cntr), NULL, NULL, NULL, NULL,
|
IPFW_RULE_CNTR_SIZE, NULL, NULL, NULL, NULL,
|
||||||
UMA_ALIGN_PTR, UMA_ZONE_PCPU);
|
UMA_ALIGN_PTR, UMA_ZONE_PCPU);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user