Skip to contentSkip to conversation

nftables: precondition validation fails on map construct

DISCUSSION Andreas Schultz 2 participants 2 messages Aug 13, 2015 – Aug 17, 2015 netfilter

lore
Share & tools
lore
#0 lore raw

Hi,

As far as I can tell the following construct should be valid:

# nft add nat prerouting ip protocol {tcp, udp} snat 10.200.4.1-10.200.4.254:10240-20480

However it fails with:

<cmdline>:1:72-82: Error: transport protocol mapping is only valid after transport protocol match add nat prerouting ip protocol {tcp, udp} snat 10.200.4.1-10.200.4.254:10240-20480

                                          ~~~~                         ^^^^^^^^^^^

Is this intended behaviour?

Andreas

#1 lore raw
Quoted 6 lines · Andreas Schultz

Hi,

As far as I can tell the following construct should be valid:

# nft add nat prerouting ip protocol {tcp, udp} snat 10.200.4.1-10.200.4.254:10240-20480
Quoted 7 lines

However it fails with:

<cmdline>:1:72-82: Error: transport protocol mapping is only valid after transport protocol match add nat prerouting ip protocol {tcp, udp} snat 10.200.4.1-10.200.4.254:10240-20480

                                          ~~~~                         ^^^^^^^^^^^

Is this intended behaviour?

Yes, sets don't create a protocol context since we can currently only handle a single protocol. It could be made to work, but right now it is expected behaviour.

Quoted 7 lines

Andreas
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html