[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190618142244.16463-1-colin.king@canonical.com>
Date: Tue, 18 Jun 2019 15:22:44 +0100
From: Colin King <colin.king@...onical.com>
To: Pablo Neira Ayuso <pablo@...filter.org>,
Jozsef Kadlecsik <kadlec@...filter.org>,
Florian Westphal <fw@...len.de>,
"David S . Miller" <davem@...emloft.net>,
netfilter-devel@...r.kernel.org, coreteam@...filter.org,
netdev@...r.kernel.org
Cc: kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH][V2][next] netfilter: synproxy: ensure zero is returned on non-error return path
From: Colin Ian King <colin.king@...onical.com>
Currently functions nf_synproxy_{ipc4|ipv6}_init return an uninitialized
garbage value in variable ret on a successful return. Fix this by
returning zero on success.
Addresses-Coverity: ("Uninitialized scalar variable")
Fixes: d7f9b2f18eae ("netfilter: synproxy: extract SYNPROXY infrastructure from {ipt, ip6t}_SYNPROXY")
Signed-off-by: Colin Ian King <colin.king@...onical.com>
---
net/netfilter/nf_synproxy_core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/netfilter/nf_synproxy_core.c b/net/netfilter/nf_synproxy_core.c
index 50677285f82e..7bf5202e3222 100644
--- a/net/netfilter/nf_synproxy_core.c
+++ b/net/netfilter/nf_synproxy_core.c
@@ -798,7 +798,7 @@ int nf_synproxy_ipv4_init(struct synproxy_net *snet, struct net *net)
}
snet->hook_ref4++;
- return err;
+ return 0;
}
EXPORT_SYMBOL_GPL(nf_synproxy_ipv4_init);
@@ -1223,7 +1223,7 @@ nf_synproxy_ipv6_init(struct synproxy_net *snet, struct net *net)
}
snet->hook_ref6++;
- return err;
+ return 0;
}
EXPORT_SYMBOL_GPL(nf_synproxy_ipv6_init);
--
2.20.1
Powered by blists - more mailing lists