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
[ Upstream commit 77522ff ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
ffourcot authored and gregkh committed Dec 1, 2021
1 parent a3d829e commit 994065f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions net/netfilter/nf_conntrack_netlink.c
Expand Up @@ -974,10 +974,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 994065f

Please sign in to comment.