From 443503f53530c3829e7805018b3f7b55e6dcd3c4 Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Tue, 30 Nov 2021 00:50:53 +0100 Subject: exthdr: fix type number saved in udata This should store the index of the protocol template, but &x[i] - &x[0] is always i, so remove the divide. Also add test case. Fixes: 01fbc1574b9e ("exthdr: add parse and build userdata interface") Signed-off-by: Florian Westphal Acked-by: Phil Sutter --- tests/shell/testcases/sets/dumps/typeof_sets_0.nft | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/shell/testcases/sets/dumps') diff --git a/tests/shell/testcases/sets/dumps/typeof_sets_0.nft b/tests/shell/testcases/sets/dumps/typeof_sets_0.nft index 565369fb..06d891e6 100644 --- a/tests/shell/testcases/sets/dumps/typeof_sets_0.nft +++ b/tests/shell/testcases/sets/dumps/typeof_sets_0.nft @@ -14,6 +14,11 @@ table inet t { elements = { 2, 3, 103 } } + set s4 { + typeof frag frag-off + elements = { 1, 1024 } + } + chain c1 { osf name @s1 accept } -- cgit v1.2.3