summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2018-09-05 11:16:43 +0200
committerFlorian Westphal <fw@strlen.de>2018-09-21 12:04:37 +0200
commit8f55ed41d007061bd8aae94fee2bda172c0e8996 (patch)
tree719531822c39a05e6370d6abe921bd4eb17f5dea /src
parent04ca9a6ba3ca369053e9b5951f2f85bf8fe98e72 (diff)
src: rename meta secpath to meta ipsec
for symmetry with 'rt ipsec'. "meta secpath" still works. Signed-off-by: Florian Westphal <fw@strlen.de> Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src')
-rw-r--r--src/meta.c5
-rw-r--r--src/parser_bison.y1
2 files changed, 5 insertions, 1 deletions
diff --git a/src/meta.c b/src/meta.c
index 1bd91db2..3677561b 100644
--- a/src/meta.c
+++ b/src/meta.c
@@ -442,7 +442,7 @@ const struct meta_template meta_templates[] = {
[NFT_META_PRANDOM] = META_TEMPLATE("random", &integer_type,
4 * BITS_PER_BYTE,
BYTEORDER_BIG_ENDIAN), /* avoid conversion; doesn't have endianess */
- [NFT_META_SECPATH] = META_TEMPLATE("secpath", &boolean_type,
+ [NFT_META_SECPATH] = META_TEMPLATE("ipsec", &boolean_type,
BITS_PER_BYTE, BYTEORDER_HOST_ENDIAN),
};
@@ -665,6 +665,9 @@ struct error_record *meta_key_parse(const struct location *loc,
} else if (strcmp(str, "obriport") == 0) {
*value = NFT_META_BRI_OIFNAME;
return NULL;
+ } else if (strcmp(str, "secpath") == 0) {
+ *value = NFT_META_SECPATH;
+ return NULL;
}
len = (int)sizeof(buf);
diff --git a/src/parser_bison.y b/src/parser_bison.y
index 32d61b3b..5fd304a9 100644
--- a/src/parser_bison.y
+++ b/src/parser_bison.y
@@ -3726,6 +3726,7 @@ meta_key_unqualified : MARK { $$ = NFT_META_MARK; }
| IIFGROUP { $$ = NFT_META_IIFGROUP; }
| OIFGROUP { $$ = NFT_META_OIFGROUP; }
| CGROUP { $$ = NFT_META_CGROUP; }
+ | IPSEC { $$ = NFT_META_SECPATH; }
;
meta_stmt : META meta_key SET stmt_expr