summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorJeremy Sowden <jeremy@azazel.net>2023-03-23 17:58:44 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2023-03-28 10:31:53 +0200
commitcab08c47e687104c3774e196240f3da1ad2834e7 (patch)
treeda79a2f0b490f8234299a723a2d2568549ba1514 /examples
parent5e39a34b196d68b803911aa13066fef2f83dc98c (diff)
netlink_delinearize: correct type and byte-order of shifts
Downgrade to base type integer instead of the specific type from the expression that is used in the shift operation. Without this, listing a rule like: ct mark set ip dscp lshift 2 or 0x10 will return: ct mark set ip dscp << 2 | cs2 because the type of the OR's right operand will be transitively derived from `ip dscp`. However, this is not valid syntax: # nft add rule t c ct mark set ip dscp '<<' 2 '|' cs2 Error: Could not parse integer add rule t c ct mark set ip dscp << 2 | cs2 ^^^ Use xinteger_type to print the output in hexadecimal. Signed-off-by: Jeremy Sowden <jeremy@azazel.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'examples')
0 files changed, 0 insertions, 0 deletions