From 005369151ed52631b0e495268737f6915977dc20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Eckl?= Date: Tue, 29 May 2018 01:11:44 +0200 Subject: include: updated nf_tables.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Joint work with Pablo. Signed-off-by: Máté Eckl Signed-off-by: Pablo Neira Ayuso --- src/expr/ct.c | 6 +----- src/expr/rt.c | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/expr/ct.c b/src/expr/ct.c index d4dd1d9..39e9be6 100644 --- a/src/expr/ct.c +++ b/src/expr/ct.c @@ -31,10 +31,6 @@ struct nftnl_expr_ct { #define IP_CT_DIR_ORIGINAL 0 #define IP_CT_DIR_REPLY 1 -#ifndef NFT_CT_MAX -#define NFT_CT_MAX (NFT_CT_DST_IP6 + 1) -#endif - static int nftnl_expr_ct_set(struct nftnl_expr *e, uint16_t type, const void *data, uint32_t data_len) @@ -152,7 +148,7 @@ nftnl_expr_ct_parse(struct nftnl_expr *e, struct nlattr *attr) return 0; } -static const char *ctkey2str_array[NFT_CT_MAX] = { +static const char *ctkey2str_array[NFT_CT_MAX + 1] = { [NFT_CT_STATE] = "state", [NFT_CT_DIRECTION] = "direction", [NFT_CT_STATUS] = "status", diff --git a/src/expr/rt.c b/src/expr/rt.c index 62c01a0..ab56831 100644 --- a/src/expr/rt.c +++ b/src/expr/rt.c @@ -19,10 +19,6 @@ #include #include -#ifndef NFT_RT_MAX -#define NFT_RT_MAX (NFT_RT_TCPMSS + 1) -#endif - struct nftnl_expr_rt { enum nft_rt_keys key; enum nft_registers dreg; @@ -116,7 +112,7 @@ nftnl_expr_rt_parse(struct nftnl_expr *e, struct nlattr *attr) return 0; } -static const char *rt_key2str_array[NFT_RT_MAX] = { +static const char *rt_key2str_array[NFT_RT_MAX + 1] = { [NFT_RT_CLASSID] = "classid", [NFT_RT_NEXTHOP4] = "nexthop4", [NFT_RT_NEXTHOP6] = "nexthop6", -- cgit v1.2.3