]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: ctnetlink: Fix regression in CTA_STATUS processing
authorKevin Cernekee <cernekee@chromium.org>
Thu, 26 Jan 2017 22:49:43 +0000 (14:49 -0800)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 6 Feb 2017 11:48:26 +0000 (12:48 +0100)
commitdf8d2d99b73912033635e5db5a99256ae4fa6a04
treef2f33bbecd14af82f866c6297ac6f5607ba8a90f
parentaeb476cea0e98ee7c150b86b4fe9561a4c4a20a1
netfilter: ctnetlink: Fix regression in CTA_STATUS processing

The libnetfilter_conntrack userland library always sets IPS_CONFIRMED
when building a CTA_STATUS attribute.  If this toggles the bit from
0->1, the parser will return an error.  On Linux 4.4+ this will cause any
NFQA_EXP attribute in the packet to be ignored.  This breaks conntrackd's
userland helpers because they operate on unconfirmed connections.

Instead of returning -EBUSY if the user program asks to modify an
unchangeable bit, simply ignore the change.

Also, fix the logic so that user programs are allowed to clear
the bits that they are allowed to change.

Signed-off-by: Kevin Cernekee <cernekee@chromium.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/uapi/linux/netfilter/nf_conntrack_common.h
net/netfilter/nf_conntrack_netlink.c