I'm trying to set a packet's mark field to a 32-bit field in the (layer-5) header, using nft add rule inet filter output udp dport 31337 meta mark set @th,96,32
. (I'm pulling second dword in the layer-5 header, but because the extraction starts at the offset of the layer-4 header I add 64 bits to get to the UDP payload.)
However, I get Error: datatype mismatch: expected packet mark, expression has type integer
. The integer
type in nftables is variable-length; the mark
type is a specialization of the integer
type that's exactly 32 bits long. I can't figure out how to cast or otherwise convince nftables that the type is actually OK.
Any insights?
Because I'm using nftables 0.9.0, and this bug wasn't fixed until 0.9.1.