From 590610d45983d48bc84adc7901e6e49628dab3c9 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Fri, 31 Aug 2018 16:16:40 +0200 Subject: obj: ct_timeout: use fixed size array Use an internal array and expose maximum size so we can just use the same array size for all protocol timeouts. This simplifies handling a bit and we don't need to set NFTNL_OBJ_CT_TIMEOUT_L4PROTO in first place. Signed-off-by: Pablo Neira Ayuso --- include/libnftnl/object.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/libnftnl') diff --git a/include/libnftnl/object.h b/include/libnftnl/object.h index e846698..0279705 100644 --- a/include/libnftnl/object.h +++ b/include/libnftnl/object.h @@ -62,6 +62,8 @@ enum nftnl_cttimeout_array_udp { NFTNL_CTTIMEOUT_UDP_MAX }; +#define NFTNL_CTTIMEOUT_ARRAY_MAX NFTNL_CTTIMEOUT_TCP_MAX + enum { NFTNL_OBJ_CT_TIMEOUT_L3PROTO = NFTNL_OBJ_BASE, NFTNL_OBJ_CT_TIMEOUT_L4PROTO, -- cgit v1.2.3