netfilter.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* libnftables way of deleting a rule
@ 2024-07-31 12:41 Arne Zachlod
  2024-08-01 18:01 ` Florian Westphal
  0 siblings, 1 reply; 2+ messages in thread
From: Arne Zachlod @ 2024-07-31 12:41 UTC (permalink / raw)
  To: netfilter

Hi,

I'm porting a program (written in C) that currently uses iptables to 
nftables, trying to not change a lot of the internal concept of said 
program.
The program currently uses execute() calls and calls iptables directly 
via these. I wanted to at least use libnftables, and everything seems to 
works quite well, I just have a problem with deleting rules.
I read through the code of libnftables, but I couldn't find a way to get 
the handle of a rule I added. In iptables, this is no problem, you just 
give the rule again to delete it. In libnftables though I need the 
handle. Currently, I'm looking into libnftables-json, but I would prefer 
not to use it just to get the handles. Is there a better way of deleting 
a rule than parsing the JSON for them? Maybe even with libnftables directly?

Best Regards,
Arne

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-08-01 18:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-31 12:41 libnftables way of deleting a rule Arne Zachlod
2024-08-01 18:01 ` Florian Westphal

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).