1 From foo@baz Thu Oct 19 15:22:10 CEST 2017
2 From: Jarno Rajahalme <jarno@ovn.org>
3 Date: Thu, 23 Feb 2017 17:08:54 -0800
4 Subject: netfilter: nf_ct_expect: Change __nf_ct_expect_check() return value.
6 From: Jarno Rajahalme <jarno@ovn.org>
9 [ Upstream commit 4b86c459c7bee3acaf92f0e2b4c6ac803eaa1a58 ]
11 Commit 4dee62b1b9b4 ("netfilter: nf_ct_expect: nf_ct_expect_insert()
12 returns void") inadvertently changed the successful return value of
13 nf_ct_expect_related_report() from 0 to 1 due to
14 __nf_ct_expect_check() returning 1 on success. Prevent this
15 regression in the future by changing the return value of
16 __nf_ct_expect_check() to 0 on success.
18 Signed-off-by: Jarno Rajahalme <jarno@ovn.org>
19 Acked-by: Joe Stringer <joe@ovn.org>
20 Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
21 Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
22 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
24 net/netfilter/nf_conntrack_expect.c | 4 ++--
25 1 file changed, 2 insertions(+), 2 deletions(-)
27 --- a/net/netfilter/nf_conntrack_expect.c
28 +++ b/net/netfilter/nf_conntrack_expect.c
29 @@ -392,7 +392,7 @@ static inline int __nf_ct_expect_check(s
30 struct net *net = nf_ct_exp_net(expect);
31 struct hlist_node *next;
38 @@ -442,7 +442,7 @@ int nf_ct_expect_related_report(struct n
40 spin_lock_bh(&nf_conntrack_expect_lock);
41 ret = __nf_ct_expect_check(expect);
46 ret = nf_ct_expect_insert(expect);