Re: Creating a map programmatically using the C library libnftnl

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

 



Kiernan George <kbg98@xxxxxx> wrote:
> That works to create the map, but when I go to add an element through
> the command line it fails with this error:
> 
> root@laptop:/tmp# nft add element netdev example test2 { 1.1.1.1 .
> 1111 : 2.2.2.2 }
> Error: Could not process rule: File exists 
> add element netdev example test2 { 1.1.1.1 . 1111 : 2.2.2.2 }
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
> Do you have any insight?

Worksforme.  'File exists' hints that you are adding the same element
again.  The key has to be unique, so:

add element netdev example test2 { 1.1.1.1 . 1111 : 2.2.2.2 }
add element netdev example test2 { 1.1.1.1 . 1111 : 2.2.2.3 } // Fails even if value is different



[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