FROMLIST: netfilter: ctnetlink: Fix regression in CTA_HELP processing

Prior to Linux 4.4, it was usually harmless to send a CTA_HELP attribute
containing the name of the current helper.  That is no longer the case:
as of Linux 4.4, if ctnetlink_change_helper() returns an error from
the ct->master check, processing of the request will fail, skipping the
NFQA_EXP attribute (if present).

This patch changes the behavior to improve compatibility with user
programs that expect the kernel interface to work the way it did prior
to Linux 4.4.  If a user program specifies CTA_HELP but the argument
matches the current conntrack helper name, ignore it instead of generating
an error.

BUG=b:29551145
TEST=manually run conntrackd on kevin, pyro

Link: https://patchwork.kernel.org/patch/9519975/
Fixes: b7bd1809e078 ("netfilter: nfnetlink_queue: get rid of nfnetlink_queue_ct.c")
Change-Id: I31a5b2780a829b99e9a3f8934985345a74c4adfb
Signed-off-by: Kevin Cernekee <cernekee@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/428494
Reviewed-by: Douglas Anderson <dianders@chromium.org>
1 file changed