Re: device list reversed

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

 



Am 20. April 2021 13:28:04 MESZ schrieb Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>:
>On Sun, Apr 11, 2021 at 03:07:41PM +0200, Frank Wunderlich wrote:
>> Hi,
>> 
>> i import ruleset by file with a devicelist (flowtable)
>> 
>> devices = { wan, lan0, lan3 }
>> 
>> and if i do a nft list ruleset, it gets reversed
>> 
>> devices = { lan3, lan0, wan }

>Each device is represented as a hook, and hook are registered using
>list_add() IIRC, which is reversing the order.

Should list_add not append (instead of insert at 0) and if devices read from left to right it should not reverse?

>Probably just sort device names alphanumerically?

>From user pov i expect the order i have used for importing. As far as i understand internally order does not matter,only if device is listed or not. Maybe reversing it (again) on printing? Maybe user wants wan first and lan-ports after it.

But as far as i've wrote...it's cosmetic...just stumbled over it
Hi Pablo,
regards Frank




[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