Skip to contentSkip to conversation

nft: bitoperations between ct and nf mark

DISCUSSION Andreas Schultz 1 participant 1 message Jul 3, 2015

lore
Share & tools
lore
#0 lore raw

Hi,

With iptables CONNMARK, one could something like:

... -j CONNMARK --restore-mark --nfmask 0xAA --ctmask 0x0F

There seems to be no way to replicate this with nftables meta ct and mark.

Attemting so use something like:

meta mark set (meta & 0xffffff55) | (ct mark & 0xfffffff0)

results in:

Quoted 1 line

Error: Right hand side of binary operation (&) must be constant

How i can replicate the restore mark with masks behavior in nft?

Regards
Andreas