Skip to content

Commit

Permalink
netfilter: ctnetlink: do not erase error code with EINVAL
Browse files Browse the repository at this point in the history
And be consistent in error management for both orig/reply filtering

Fixes: cb8aa9a ("netfilter: ctnetlink: add kernel side filtering for dump")
Signed-off-by: Florent Fourcot <florent.fourcot@wifirst.fr>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  • Loading branch information
Florent Fourcot authored and Pablo Neira Ayuso committed Nov 8, 2021
1 parent ad81d4d commit 77522ff
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions net/netfilter/nf_conntrack_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -1012,10 +1012,8 @@ ctnetlink_alloc_filter(const struct nlattr * const cda[], u8 family)
filter->family,
&filter->zone,
filter->reply_flags);
if (err < 0) {
err = -EINVAL;
if (err < 0)
goto err_filter;
}
}

return filter;
Expand Down

0 comments on commit 77522ff

Please sign in to comment.