nftables type for ipv4_addr -> packetmark map?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello list,

this is (probably) a very simple user question so if there's already a
solution available elsewhere, don't hesitate to send me RTFM with a
link or so.

The problem statement is really simple - I've been trying to create a
permanent, "named" map/dict using nftables that would be usuable for
similar marking like from this example:

# nft mangle output mark set ip saddr map {  192.168.0.0/24 : 0x1,
192.168.1.0-192.168.1.64 : 0x2, 192.168.2.1 : 0x3 }

Creating the map as any persistent object fails, because I'm unable to
find the name of the mapping type from documentation. So, for example,
this (packetmark type name taken from manpage) fails:

 # nft add map mangle mydict { type ipv4_addr : packetmark\; }
<cmdline>:1:42-51: Error: unknown datatype packetmark
<cmdline>:1:23-52: Error: map definition does not specify key data type

>From nftables sources, it would be obvious to use "mark" type as
defined in `nftables/src/datatype.c' line ~687:

 # nft add map mangle mydict { type ipv4_addr : mark\; }
<cmdline>:1:42-45: Error: syntax error, unexpected mark, expecting string
<cmdline>:1:23-46: Error: map definition does not specify key data type

...seems a bit like quoting/keyword conflict parsing-related issue to
me, but that's a wild guess. What then is the correct datatype name
for ipv4_addr -> mark map?

Thanks in advance for any help.

-mk
--
To unsubscribe from this list: send the line "unsubscribe netfilter" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux