Linux Netfilter development
 help / color / mirror / Atom feed
* [PATCH nft 0/4] second batch of typeof fixes
@ 2021-12-07 15:16 Florian Westphal
  2021-12-07 15:16 ` [PATCH nft 1/4] tests: add shift+and typeof test cases Florian Westphal
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Florian Westphal @ 2021-12-07 15:16 UTC (permalink / raw)
  To: netfilter-devel; +Cc: Florian Westphal

This series makes typeof-sets work in corner cases such as

set s4 { typeof frag frag-off }
set s8 { typeof ip version }

frag frag-off @s4 accept
ip version @s8

Due to the shift/mask expressions needed to cope with these
delinearization can't figure out the correct payload/exthdr templates
and nft lists this as:

(frag unknown & 0xfff8 [invalid type]) >> 3 == @s4
(ip l4proto & pfsync) >> 4 == @s8

With this series, the mask/shift expressions are removed and
nft can print them in a readable way.

Florian Westphal (4):
  tests: add shift+and typeof test cases
  payload: skip templates with meta key set
  netlink_delinearize: and/shift postprocessing
  netlink_delinearize: zero shift removal

 src/netlink_delinearize.c                  | 28 +++++++++++++++++++
 src/payload.c                              |  3 ++
 .../testcases/sets/dumps/typeof_sets_0.nft | 23 +++++++++++++++
 tests/shell/testcases/sets/typeof_sets_0   | 22 +++++++++++++++
 4 files changed, 76 insertions(+)
-- 
2.32.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-12-09  0:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-07 15:16 [PATCH nft 0/4] second batch of typeof fixes Florian Westphal
2021-12-07 15:16 ` [PATCH nft 1/4] tests: add shift+and typeof test cases Florian Westphal
2021-12-07 15:16 ` [PATCH nft 2/4] payload: skip templates with meta key set Florian Westphal
2021-12-07 15:16 ` [PATCH nft 3/4] netlink_delinearize: and/shift postprocessing Florian Westphal
2021-12-07 15:16 ` [PATCH nft 4/4] netlink_delinearize: zero shift removal Florian Westphal
2021-12-09  0:31 ` [PATCH nft 0/4] second batch of typeof fixes Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox