summaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorGao Feng <fgao@ikuai8.com>2016-08-29 18:25:28 +0800
committerPablo Neira Ayuso <pablo@netfilter.org>2016-08-30 11:52:32 +0200
commit779994fa3636d46848edb402fe7517968e036e6f (patch)
tree59398c227d211898054545b870b5bf20dcda746f /net/ipv6
parent3cb27991aad74299af2cd55a9c12684f5b0c76c6 (diff)
downloadlinux-779994fa3636d46848edb402fe7517968e036e6f.tar.gz
linux-779994fa3636d46848edb402fe7517968e036e6f.tar.bz2
linux-779994fa3636d46848edb402fe7517968e036e6f.zip
netfilter: log: Check param to avoid overflow in nf_log_set
The nf_log_set is an interface function, so it should do the strict sanity check of parameters. Convert the return value of nf_log_set as int instead of void. When the pf is invalid, return -EOPNOTSUPP. Signed-off-by: Gao Feng <fgao@ikuai8.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/netfilter/nf_log_ipv6.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv6/netfilter/nf_log_ipv6.c b/net/ipv6/netfilter/nf_log_ipv6.c
index 8dd869642f45..c1bcf699a23d 100644
--- a/net/ipv6/netfilter/nf_log_ipv6.c
+++ b/net/ipv6/netfilter/nf_log_ipv6.c
@@ -379,8 +379,7 @@ static struct nf_logger nf_ip6_logger __read_mostly = {
static int __net_init nf_log_ipv6_net_init(struct net *net)
{
- nf_log_set(net, NFPROTO_IPV6, &nf_ip6_logger);
- return 0;
+ return nf_log_set(net, NFPROTO_IPV6, &nf_ip6_logger);
}
static void __net_exit nf_log_ipv6_net_exit(struct net *net)