summaryrefslogtreecommitdiff
path: root/net/netfilter
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2019-06-18 17:22:44 +0300
committerPablo Neira Ayuso <pablo@netfilter.org>2019-06-19 18:48:34 +0300
commit72c5e11854afb842e157353be0291d65b91725f5 (patch)
tree3e10056c5de53b36985aa3bfd8f0575219cb2ada /net/netfilter
parentd7f9b2f18eaef74b4f948c7e24e3a8f796f0c90d (diff)
downloadlinux-72c5e11854afb842e157353be0291d65b91725f5.tar.xz
netfilter: synproxy: ensure zero is returned on non-error return path
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@canonical.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter')
-rw-r--r--net/netfilter/nf_synproxy_core.c4
1 files 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);