* [libnftnl PATCH 1/2] chain: Support unsetting NFTNL_CHAIN_USERDATA attribute
@ 2024-07-10 15:33 Phil Sutter
2024-07-10 15:33 ` [libnftnl PATCH 2/2] table: Support unsetting NFTNL_TABLE_USERDATA attribute Phil Sutter
2024-07-10 21:09 ` [libnftnl PATCH 1/2] chain: Support unsetting NFTNL_CHAIN_USERDATA attribute Phil Sutter
0 siblings, 2 replies; 3+ messages in thread
From: Phil Sutter @ 2024-07-10 15:33 UTC (permalink / raw)
To: Pablo Neira Ayuso; +Cc: netfilter-devel
Cosmetics, but support unsetting anything that may be set.
Fixes: 76b82c425818e ("chain: add userdata and comment support")
Signed-off-by: Phil Sutter <phil@nwl.cc>
---
src/chain.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/chain.c b/src/chain.c
index c7026f486b104..0b68939fe21a7 100644
--- a/src/chain.c
+++ b/src/chain.c
@@ -185,6 +185,9 @@ void nftnl_chain_unset(struct nftnl_chain *c, uint16_t attr)
xfree(c->dev_array[i]);
xfree(c->dev_array);
break;
+ case NFTNL_CHAIN_USERDATA:
+ xfree(c->user.data);
+ break;
default:
return;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [libnftnl PATCH 2/2] table: Support unsetting NFTNL_TABLE_USERDATA attribute
2024-07-10 15:33 [libnftnl PATCH 1/2] chain: Support unsetting NFTNL_CHAIN_USERDATA attribute Phil Sutter
@ 2024-07-10 15:33 ` Phil Sutter
2024-07-10 21:09 ` [libnftnl PATCH 1/2] chain: Support unsetting NFTNL_CHAIN_USERDATA attribute Phil Sutter
1 sibling, 0 replies; 3+ messages in thread
From: Phil Sutter @ 2024-07-10 15:33 UTC (permalink / raw)
To: Pablo Neira Ayuso; +Cc: netfilter-devel
Cosmetics, but support unsetting anything that may be set.
Fixes: 99be0e6d066d7 ("table: add userdata support")
Signed-off-by: Phil Sutter <phil@nwl.cc>
---
src/table.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/table.c b/src/table.c
index 13f01cfbf1e6f..1a5f6f3bcc507 100644
--- a/src/table.c
+++ b/src/table.c
@@ -74,6 +74,9 @@ void nftnl_table_unset(struct nftnl_table *t, uint16_t attr)
case NFTNL_TABLE_NAME:
xfree(t->name);
break;
+ case NFTNL_TABLE_USERDATA:
+ xfree(t->user.data);
+ break;
case NFTNL_TABLE_FLAGS:
case NFTNL_TABLE_HANDLE:
case NFTNL_TABLE_FAMILY:
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [libnftnl PATCH 1/2] chain: Support unsetting NFTNL_CHAIN_USERDATA attribute
2024-07-10 15:33 [libnftnl PATCH 1/2] chain: Support unsetting NFTNL_CHAIN_USERDATA attribute Phil Sutter
2024-07-10 15:33 ` [libnftnl PATCH 2/2] table: Support unsetting NFTNL_TABLE_USERDATA attribute Phil Sutter
@ 2024-07-10 21:09 ` Phil Sutter
1 sibling, 0 replies; 3+ messages in thread
From: Phil Sutter @ 2024-07-10 21:09 UTC (permalink / raw)
To: Pablo Neira Ayuso; +Cc: netfilter-devel
On Wed, Jul 10, 2024 at 05:33:21PM +0200, Phil Sutter wrote:
> Cosmetics, but support unsetting anything that may be set.
>
> Fixes: 76b82c425818e ("chain: add userdata and comment support")
> Signed-off-by: Phil Sutter <phil@nwl.cc>
Both patches applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-07-10 21:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-10 15:33 [libnftnl PATCH 1/2] chain: Support unsetting NFTNL_CHAIN_USERDATA attribute Phil Sutter
2024-07-10 15:33 ` [libnftnl PATCH 2/2] table: Support unsetting NFTNL_TABLE_USERDATA attribute Phil Sutter
2024-07-10 21:09 ` [libnftnl PATCH 1/2] chain: Support unsetting NFTNL_CHAIN_USERDATA attribute Phil Sutter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox