summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSriram Yagnaraman <sriram.yagnaraman@est.tech>2023-02-26 10:53:08 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2023-03-15 12:40:49 +0100
commit86a5461dadb488caa0c840715b9039ba214a2d9f (patch)
tree4877ec2c45375d53a92804a1eba4afbe29341edb
parentc62bef65fef638452b4ed1893c2451fc253ca7ca (diff)
expr: meta: introduce broute meta expressionHEADmaster
libnftnl support for broute meta statement introduced in: https://patchwork.ozlabs.org/project/netfilter-devel/patch/20230224095251.11249-1-sriram.yagnaraman@est.tech/ Signed-off-by: Sriram Yagnaraman <sriram.yagnaraman@est.tech> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r--include/linux/netfilter/nf_tables.h2
-rw-r--r--src/expr/meta.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/netfilter/nf_tables.h b/include/linux/netfilter/nf_tables.h
index 4608646..c48b193 100644
--- a/include/linux/netfilter/nf_tables.h
+++ b/include/linux/netfilter/nf_tables.h
@@ -914,6 +914,7 @@ enum nft_exthdr_attributes {
* @NFT_META_TIME_HOUR: hour of day (in seconds)
* @NFT_META_SDIF: slave device interface index
* @NFT_META_SDIFNAME: slave device interface name
+ * @NFT_META_BRI_BROUTE: packet br_netfilter_broute bit
*/
enum nft_meta_keys {
NFT_META_LEN,
@@ -952,6 +953,7 @@ enum nft_meta_keys {
NFT_META_TIME_HOUR,
NFT_META_SDIF,
NFT_META_SDIFNAME,
+ NFT_META_BRI_BROUTE,
__NFT_META_IIFTYPE,
};
diff --git a/src/expr/meta.c b/src/expr/meta.c
index 96544a4..183f441 100644
--- a/src/expr/meta.c
+++ b/src/expr/meta.c
@@ -22,7 +22,7 @@
#include <libnftnl/rule.h>
#ifndef NFT_META_MAX
-#define NFT_META_MAX (NFT_META_SDIFNAME + 1)
+#define NFT_META_MAX (NFT_META_BRI_BROUTE + 1)
#endif
struct nftnl_expr_meta {
@@ -168,6 +168,7 @@ static const char *meta_key2str_array[NFT_META_MAX] = {
[NFT_META_TIME_HOUR] = "hour",
[NFT_META_SDIF] = "sdif",
[NFT_META_SDIFNAME] = "sdifname",
+ [NFT_META_BRI_BROUTE] = "broute",
};
static const char *meta_key2str(uint8_t key)