From: Kevin Cernekee <cernekee@chromium.org>
To: pablo@netfilter.org
Cc: netfilter-devel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [RFC/PATCH 3/3] netfilter: ctnetlink: Fix regression in CTA_HELP processing
Date: Mon, 16 Jan 2017 21:14:08 -0800 [thread overview]
Message-ID: <1484630048-25416-4-git-send-email-cernekee@chromium.org> (raw)
In-Reply-To: <1484630048-25416-1-git-send-email-cernekee@chromium.org>
If a user program specifies CTA_HELP but the argument matches the
current conntrack helper name, ignore it instead of generating an error.
Signed-off-by: Kevin Cernekee <cernekee@chromium.org>
---
net/netfilter/nf_conntrack_netlink.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c
index cc59f388928e..2912f582da65 100644
--- a/net/netfilter/nf_conntrack_netlink.c
+++ b/net/netfilter/nf_conntrack_netlink.c
@@ -1472,14 +1472,19 @@ ctnetlink_change_helper(struct nf_conn *ct, const struct nlattr * const cda[])
struct nlattr *helpinfo = NULL;
int err;
- /* don't change helper of sibling connections */
- if (ct->master)
- return -EBUSY;
-
err = ctnetlink_parse_help(cda[CTA_HELP], &helpname, &helpinfo);
if (err < 0)
return err;
+ /* don't change helper of sibling connections */
+ if (ct->master) {
+ if (help && help->helper &&
+ !strcmp(help->helper->name, helpname))
+ return 0;
+ else
+ return -EBUSY;
+ }
+
if (!strcmp(helpname, "")) {
if (help && help->helper) {
/* we had a helper before ... */
--
2.7.4
next prev parent reply other threads:[~2017-01-17 5:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-17 5:14 [RFC/PATCH 0/3] Fix ctnetlink regressions Kevin Cernekee
2017-01-17 5:14 ` [RFC/PATCH 1/3] netfilter: ctnetlink: Fix regression in CTA_TIMEOUT processing Kevin Cernekee
2017-01-18 18:54 ` Doug Anderson
2017-01-17 5:14 ` [RFC/PATCH 2/3] netfilter: ctnetlink: Fix regression in CTA_STATUS processing Kevin Cernekee
2017-01-18 19:02 ` Doug Anderson
2017-01-17 5:14 ` Kevin Cernekee [this message]
2017-01-18 19:08 ` [RFC/PATCH 3/3] netfilter: ctnetlink: Fix regression in CTA_HELP processing Doug Anderson
2017-01-25 0:36 ` [RFC/PATCH 0/3] Fix ctnetlink regressions Pablo Neira Ayuso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1484630048-25416-4-git-send-email-cernekee@chromium.org \
--to=cernekee@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).