From dfe3828f77b52a2d46b5f40e2c125b60e99cbaec Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Wed, 4 Dec 2019 15:45:43 +0100 Subject: examples: Replace use of deprecated symbols Do not use unqualified setters to avoid the warnings. Pass a (false) zero length value to nftnl_flowtable_set_data() when assigning to NFTNL_FLOWTABLE_DEVICES as the length value is unused and not even usable. Maybe one should introduce a dedicated nftnl_flowtable_set_devices() at a later point. Fixes: 7349a70634fa0 ("Deprecate untyped data setters") Signed-off-by: Phil Sutter Acked-by: Pablo Neira Ayuso Acked-by: Arturo Borrero Gonzalez --- examples/nft-ct-timeout-add.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'examples/nft-ct-timeout-add.c') diff --git a/examples/nft-ct-timeout-add.c b/examples/nft-ct-timeout-add.c index 57c0cf0..913290f 100644 --- a/examples/nft-ct-timeout-add.c +++ b/examples/nft-ct-timeout-add.c @@ -71,7 +71,8 @@ static struct nftnl_obj *obj_add_parse(int argc, char *argv[]) nftnl_obj_set_str(t, NFTNL_OBJ_NAME, argv[3]); nftnl_obj_set_u8(t, NFTNL_OBJ_CT_TIMEOUT_L4PROTO, l4proto); nftnl_obj_set_u16(t, NFTNL_OBJ_CT_TIMEOUT_L3PROTO, NFPROTO_IPV4); - nftnl_obj_set(t, NFTNL_OBJ_CT_TIMEOUT_ARRAY, timeout); + nftnl_obj_set_data(t, NFTNL_OBJ_CT_TIMEOUT_ARRAY, + timeout, timeout_array_size); return t; } -- cgit v1.2.3