netfilter: log: Check param to avoid overflow in nf_log_set
authorGao Feng <fgao@ikuai8.com>
Mon, 29 Aug 2016 10:25:28 +0000 (18:25 +0800)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 30 Aug 2016 09:52:32 +0000 (11:52 +0200)
commit779994fa3636d46848edb402fe7517968e036e6f
tree59398c227d211898054545b870b5bf20dcda746f
parent3cb27991aad74299af2cd55a9c12684f5b0c76c6
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>
include/net/netfilter/nf_log.h
net/bridge/netfilter/nf_log_bridge.c
net/ipv4/netfilter/nf_log_arp.c
net/ipv4/netfilter/nf_log_ipv4.c
net/ipv6/netfilter/nf_log_ipv6.c
net/netfilter/nf_log.c