* [conntrack-tools PATCH] conntrack: Fix for ENOENT in mnl_nfct_delete_cb()
@ 2024-11-05 21:33 Phil Sutter
2024-11-05 22:01 ` Florian Westphal
2024-11-05 22:55 ` Phil Sutter
0 siblings, 2 replies; 3+ messages in thread
From: Phil Sutter @ 2024-11-05 21:33 UTC (permalink / raw)
To: Pablo Neira Ayuso; +Cc: netfilter-devel
Align behaviour with that of mnl_nfct_update_cb(): Just free the
nf_conntrack object and return. Do not increment counter variable, and
certainly do not try to print an uninitialized buffer.
Fixes: a7abf3f5dc7c4 ("conntrack: skip ENOENT when -U/-D finds a stale conntrack entry")
Signed-off-by: Phil Sutter <phil@nwl.cc>
---
src/conntrack.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/conntrack.c b/src/conntrack.c
index a51a3ef82fcfc..52ba4ac5e44f7 100644
--- a/src/conntrack.c
+++ b/src/conntrack.c
@@ -2030,7 +2030,7 @@ static int mnl_nfct_delete_cb(const struct nlmsghdr *nlh, void *data)
if (res < 0) {
/* the entry has vanish in middle of the delete */
if (errno == ENOENT)
- goto done;
+ goto destroy_ok;
exit_error(OTHER_PROBLEM,
"Operation failed: %s",
err2str(errno, CT_DELETE));
--
2.47.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [conntrack-tools PATCH] conntrack: Fix for ENOENT in mnl_nfct_delete_cb()
2024-11-05 21:33 [conntrack-tools PATCH] conntrack: Fix for ENOENT in mnl_nfct_delete_cb() Phil Sutter
@ 2024-11-05 22:01 ` Florian Westphal
2024-11-05 22:55 ` Phil Sutter
1 sibling, 0 replies; 3+ messages in thread
From: Florian Westphal @ 2024-11-05 22:01 UTC (permalink / raw)
To: Phil Sutter; +Cc: Pablo Neira Ayuso, netfilter-devel
Phil Sutter <phil@nwl.cc> wrote:
> Align behaviour with that of mnl_nfct_update_cb(): Just free the
> nf_conntrack object and return. Do not increment counter variable, and
> certainly do not try to print an uninitialized buffer.
Reviewed-by: Florian Westphal <fw@strlen.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [conntrack-tools PATCH] conntrack: Fix for ENOENT in mnl_nfct_delete_cb()
2024-11-05 21:33 [conntrack-tools PATCH] conntrack: Fix for ENOENT in mnl_nfct_delete_cb() Phil Sutter
2024-11-05 22:01 ` Florian Westphal
@ 2024-11-05 22:55 ` Phil Sutter
1 sibling, 0 replies; 3+ messages in thread
From: Phil Sutter @ 2024-11-05 22:55 UTC (permalink / raw)
To: Pablo Neira Ayuso; +Cc: netfilter-devel
On Tue, Nov 05, 2024 at 10:33:10PM +0100, Phil Sutter wrote:
> Align behaviour with that of mnl_nfct_update_cb(): Just free the
> nf_conntrack object and return. Do not increment counter variable, and
> certainly do not try to print an uninitialized buffer.
>
> Fixes: a7abf3f5dc7c4 ("conntrack: skip ENOENT when -U/-D finds a stale conntrack entry")
> Signed-off-by: Phil Sutter <phil@nwl.cc>
Patch applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-11-05 22:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-05 21:33 [conntrack-tools PATCH] conntrack: Fix for ENOENT in mnl_nfct_delete_cb() Phil Sutter
2024-11-05 22:01 ` Florian Westphal
2024-11-05 22:55 ` Phil Sutter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox