conntrack: Fix for ENOENT in mnl_nfct_delete_cb()
Phil Sutter
reviewerPATCH 1/1 conntrack: Fix for ENOENT in mnl_nfct_delete_cb()
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 <[email protected]>
--- src/conntrack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
src/conntrack.c +1 -1
@@ -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 ));
Signature · 1 line
2.47.0
Quoted 3 lines · Phil Sutter
Align behaviour with that of
mnl_nfct_update_cb(): Just free thenf_conntrackobject and return. Do not increment counter variable, and certainly do not try to print an uninitialized buffer.
Reviewed-by Florian Westphal <[email protected]>
Phil Sutter
reviewerQuoted 6 lines · Phil Sutter
Align behaviour with that of
mnl_nfct_update_cb(): Just free thenf_conntrackobject 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 <[email protected]>
Patch applied.