diff options
author | Florent Fourcot <florent.fourcot@wifirst.fr> | 2021-11-03 23:21:55 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2021-11-08 11:39:11 +0100 |
commit | 77522ff02f333434612bd72df9b376f8d3836e4d (patch) | |
tree | 12c263305a70458c4db21af662c7441f12ba43ee /net | |
parent | netfilter: ctnetlink: fix filtering with CTA_TUPLE_REPLY (diff) | |
download | linux-77522ff02f333434612bd72df9b376f8d3836e4d.tar.xz linux-77522ff02f333434612bd72df9b376f8d3836e4d.zip |
netfilter: ctnetlink: do not erase error code with EINVAL
And be consistent in error management for both orig/reply filtering
Fixes: cb8aa9a3affb ("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>
Diffstat (limited to 'net')
-rw-r--r-- | net/netfilter/nf_conntrack_netlink.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c index 2663764d0b6e..c7708bde057c 100644 --- a/net/netfilter/nf_conntrack_netlink.c +++ b/net/netfilter/nf_conntrack_netlink.c @@ -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; |