]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
netfilter: nft_log: complete NFTA_LOG_FLAGS attr support
authorLiping Zhang <liping.zhang@spreadtrum.com>
Sun, 25 Sep 2016 08:35:56 +0000 (16:35 +0800)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sun, 25 Sep 2016 21:16:43 +0000 (23:16 +0200)
commitff107d27761ff4b644c82c209e004ec9c8fbbc22
treec13c61622d47c7464af025b5076567df74bd9c9d
parent0f3cd9b3697708c86a825ae3cedabf7be6fd3e72
netfilter: nft_log: complete NFTA_LOG_FLAGS attr support

NFTA_LOG_FLAGS attribute is already supported, but the related
NF_LOG_XXX flags are not exposed to the userspace. So we cannot
explicitly enable log flags to log uid, tcp sequence, ip options
and so on, i.e. such rule "nft add rule filter output log uid"
is not supported yet.

So move NF_LOG_XXX macro definitions to the uapi/../nf_log.h. In
order to keep consistent with other modules, change NF_LOG_MASK to
refer to all supported log flags. On the other hand, add a new
NF_LOG_DEFAULT_MASK to refer to the original default log flags.

Finally, if user specify the unsupported log flags or NFTA_LOG_GROUP
and NFTA_LOG_FLAGS are set at the same time, report EINVAL to the
userspace.

Signed-off-by: Liping Zhang <liping.zhang@spreadtrum.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/net/netfilter/nf_log.h
include/uapi/linux/netfilter/nf_log.h [new file with mode: 0644]
net/bridge/netfilter/ebt_log.c
net/ipv4/netfilter/ip_tables.c
net/ipv4/netfilter/nf_log_arp.c
net/ipv4/netfilter/nf_log_ipv4.c
net/ipv6/netfilter/ip6_tables.c
net/ipv6/netfilter/nf_log_ipv6.c
net/netfilter/nf_tables_core.c
net/netfilter/nft_log.c