pf: rename PF_OPT_TABLE_PREFIX to PF_OPTIMIZER_TABLE_PFX
Move it to pf.h. OPT is misleading and usually refers to command line arguments to pfctl ok sashan kn Obtained from: OpenBSD, henning <henning@openbsd.org>, 9c6ad19ba4 Sponsored by: Rubicon Communications, LLC ("Netgate")
This commit is contained in:
@@ -1248,7 +1248,7 @@ add_opt_table(struct pfctl *pf, struct pf_opt_tbl **tbl, sa_family_t af,
|
||||
|
||||
/* This is just a temporary table name */
|
||||
snprintf((*tbl)->pt_name, sizeof((*tbl)->pt_name), "%s%d",
|
||||
PF_OPT_TABLE_PREFIX, tablenum++);
|
||||
PF_OPTIMIZER_TABLE_PFX, tablenum++);
|
||||
DEBUG("creating table <%s>", (*tbl)->pt_name);
|
||||
}
|
||||
|
||||
@@ -1315,9 +1315,9 @@ pf_opt_create_table(struct pfctl *pf, struct pf_opt_tbl *tbl)
|
||||
/* Now we have to pick a table name that isn't used */
|
||||
again:
|
||||
DEBUG("translating temporary table <%s> to <%s%x_%d>", tbl->pt_name,
|
||||
PF_OPT_TABLE_PREFIX, table_identifier, tablenum);
|
||||
PF_OPTIMIZER_TABLE_PFX, table_identifier, tablenum);
|
||||
snprintf(tbl->pt_name, sizeof(tbl->pt_name), "%s%x_%d",
|
||||
PF_OPT_TABLE_PREFIX, table_identifier, tablenum);
|
||||
PF_OPTIMIZER_TABLE_PFX, table_identifier, tablenum);
|
||||
PFRB_FOREACH(t, &table_buffer) {
|
||||
if (strcasecmp(t->pfrt_name, tbl->pt_name) == 0) {
|
||||
/* Collision. Try again */
|
||||
|
||||
@@ -263,7 +263,6 @@ struct pf_opt_tbl {
|
||||
struct node_tinithead pt_nodes;
|
||||
struct pfr_buffer *pt_buf;
|
||||
};
|
||||
#define PF_OPT_TABLE_PREFIX "__automatic_"
|
||||
|
||||
/* optimizer pf_rule container */
|
||||
struct pf_opt_rule {
|
||||
|
||||
@@ -490,6 +490,7 @@ struct pf_osfp_ioctl {
|
||||
|
||||
#define PF_ANCHOR_NAME_SIZE 64
|
||||
#define PF_ANCHOR_MAXPATH (MAXPATHLEN - PF_ANCHOR_NAME_SIZE - 1)
|
||||
#define PF_OPTIMIZER_TABLE_PFX "__automatic_"
|
||||
|
||||
struct pf_rule {
|
||||
struct pf_rule_addr src;
|
||||
|
||||
Reference in New Issue
Block a user