From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Frank Wunderlich <frank-w@public-files.de>
Cc: netfilter@vger.kernel.org
Subject: Re: device list reversed
Date: Tue, 20 Apr 2021 13:28:04 +0200 [thread overview]
Message-ID: <20210420112804.GA26530@salvia> (raw)
In-Reply-To: <trinity-199f77e0-dc05-45d9-85a6-3b583adcee10-1618146461717@3c-app-gmx-bap41>
Hi,
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 }
>
> imho this is a cosmetic thing, but strange anyway
>
> took a look in ./libnftnl/src/flowtable.c but it seems the loop is always done in forward way
>
> any idea why this happen?
Each device is represented as a hook, and hook are registered using
list_add() IIRC, which is reversing the order.
Probably just sort device names alphanumerically?
next prev parent reply other threads:[~2021-04-20 11:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-11 13:07 device list reversed Frank Wunderlich
2021-04-20 11:28 ` Pablo Neira Ayuso [this message]
2021-04-20 11:47 ` Frank Wunderlich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210420112804.GA26530@salvia \
--to=pablo@netfilter.org \
--cc=frank-w@public-files.de \
--cc=netfilter@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox