summaryrefslogtreecommitdiffstats
path: root/src/rule.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2017-11-23 15:14:01 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2017-11-24 15:03:28 +0100
commit48661c54357aea271bf87ab2b6ef907eafc97e9a (patch)
tree9222b459849f9db7332b71866df33225d9b12920 /src/rule.c
parent932847e0c3df8f6ee3dc4478f1ef0728926d9544 (diff)
src: deprecate "flow table" syntax, replace it by "meter"
According to bugzilla 1137: "flow tables" should not be syntactically unique. "Flow tables are always named, but they don't conform to the way sets, maps, and dictionaries work in terms of "add" and "delete" and all that. They are also "flow tables" instead of one word like "flows" or "throttle" or something. It seems weird to just have these break the syntactic expectations." Personally, I never liked the reference to "table" since we have very specific semantics in terms of what a "table" is netfilter for long time. This patch promotes "meter" as the new keyword. The former syntax is still accepted for a while, just to reduce chances of breaking things. At some point the former syntax will just be removed. Closes: https://bugzilla.netfilter.org/show_bug.cgi?id=1137 Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Acked-by: Arturo Borrero Gonzalez <arturo@netfilter.org>
Diffstat (limited to 'src/rule.c')
-rw-r--r--src/rule.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/rule.c b/src/rule.c
index 37d99c22..cbc40e2d 100644
--- a/src/rule.c
+++ b/src/rule.c
@@ -284,7 +284,7 @@ static void set_print_declaration(const struct set *set,
if (set->flags & (NFT_SET_MAP | NFT_SET_OBJECT))
type = "map";
else if (set->flags & NFT_SET_EVAL)
- type = "flow table";
+ type = "meter";
else
type = "set";
@@ -1197,7 +1197,7 @@ static int do_list_sets(struct netlink_ctx *ctx, struct cmd *cmd)
(set->flags & NFT_SET_ANONYMOUS ||
set->flags & NFT_SET_MAP))
continue;
- if (cmd->obj == CMD_OBJ_FLOWTABLES &&
+ if (cmd->obj == CMD_OBJ_METERS &&
!(set->flags & NFT_SET_EVAL))
continue;
if (cmd->obj == CMD_OBJ_MAPS &&
@@ -1580,9 +1580,9 @@ static int do_command_list(struct netlink_ctx *ctx, struct cmd *cmd)
return do_list_set(ctx, cmd, table);
case CMD_OBJ_RULESET:
return do_list_ruleset(ctx, cmd);
- case CMD_OBJ_FLOWTABLES:
+ case CMD_OBJ_METERS:
return do_list_sets(ctx, cmd);
- case CMD_OBJ_FLOWTABLE:
+ case CMD_OBJ_METER:
return do_list_set(ctx, cmd, table);
case CMD_OBJ_MAPS:
return do_list_sets(ctx, cmd);
@@ -1650,7 +1650,7 @@ static int do_command_flush(struct netlink_ctx *ctx, struct cmd *cmd)
return netlink_flush_chain(ctx, &cmd->handle, &cmd->location);
case CMD_OBJ_SET:
case CMD_OBJ_MAP:
- case CMD_OBJ_FLOWTABLE:
+ case CMD_OBJ_METER:
return netlink_flush_setelems(ctx, &cmd->handle,
&cmd->location);
case CMD_OBJ_RULESET: