netfilter: nf_queue: add NFQA_SKB_CSUM_NOTVERIFIED info flag
authorFlorian Westphal <fw@strlen.de>
Sat, 29 Jun 2013 12:15:47 +0000 (14:15 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sun, 30 Jun 2013 16:15:48 +0000 (18:15 +0200)
commit496e4ae7dc944faa1721bfda7e9d834d5611a874
tree7543efa6dbd1432ac7afa0ad641773bc3737e722
parent8b4d14d8eb36874daf159d33dcccd4746a6f3189
netfilter: nf_queue: add NFQA_SKB_CSUM_NOTVERIFIED info flag

The common case is that TCP/IP checksums have already been
verified, e.g. by hardware (rx checksum offload), or conntrack.

Userspace can use this flag to determine when the checksum
has not been validated yet.

If the flag is set, this doesn't necessarily mean that the packet has
an invalid checksum, e.g. if NIC doesn't support rx checksum.

Userspace that sucessfully enabled NFQA_CFG_F_GSO queue feature flag can
infer that IP/TCP checksum has already been validated if either the
SKB_INFO attribute is not present or the NFQA_SKB_CSUM_NOTVERIFIED
flag is unset.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/uapi/linux/netfilter/nfnetlink_queue.h
net/netfilter/nfnetlink_queue_core.c