Numen with reference to vmap

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

 



Hello,

Nftables wiki gives this example for numgen:

nft add rule nat prerouting numgen random mod 2 vmap { 0 : jump mychain1, 1 : jump mychain2 }

I would like to use it but with map reference, like this:

nft add rule nat prerouting numgen random mod 2 vmap @service1-endpoints

Could you please confirm if it is supported? If it is what would be the type of the key in such map? I thought it would be integer, but command fails.

sudo nft --debug all add map ipv4table k8s-57XVOCFNTLTR3Q27-endpoints   { type  integer : verdict \; }
Error: unqualified key type integer specified in map definition
add map ipv4table k8s-57XVOCFNTLTR3Q27-endpoints { type integer : verdict ; }
                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^

The ultimate  goal is to update dynamically just the  map  with available endpoints and loadbalance between them without  touching the rule.

Thank you
Serguei 





[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux