netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* inserting rule at the top of the chain using libnftnl
@ 2020-08-31 17:02 JM
  0 siblings, 0 replies; only message in thread
From: JM @ 2020-08-31 17:02 UTC (permalink / raw)
  To: netfilter-devel

Hi,

I use libnftnl to manage our firewall and adding rules to the chain. I
am using libnftnl-1.1.7/examples/nft-rule-add.c as the reference.

I have no issues appending a rule or inserting AFTER a certain rule
using NFTNL_RULE_POSITION or NFTNL_RULE_POSITION.

However, I am struggling to insert a rule at the top of the chain. I
am unable to find a way to insert a rule BEFORE another rule or top of
the chain so that the rule is the first rule.

Can someone help, please

Jim

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-08-31 17:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-31 17:02 inserting rule at the top of the chain using libnftnl JM

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).