netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Taehee Yoo <ap420073@gmail.com>
To: pablo@netfilter.org, kaber@trash.net, kadlec@blackhole.kfki.hu
Cc: netfilter-devel@vger.kernel.org, Taehee Yoo <ap420073@gmail.com>
Subject: [PATCH 1/2] netfilter: helper: Fix incorrect helper name.
Date: Sat, 14 May 2016 22:19:16 +0900	[thread overview]
Message-ID: <1463231956-26867-1-git-send-email-ap420073@gmail.com> (raw)

when register to helper, each helper adds port to name.
correct form is 'protocol name-port' but irc, sip and tftp adds
a iterator value. so it fix it.

Signed-off-by: Taehee Yoo <ap420073@gmail.com>
---
 net/netfilter/nf_conntrack_irc.c  | 2 +-
 net/netfilter/nf_conntrack_sip.c  | 2 +-
 net/netfilter/nf_conntrack_tftp.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/netfilter/nf_conntrack_irc.c b/net/netfilter/nf_conntrack_irc.c
index 8b6da27..20ae74f 100644
--- a/net/netfilter/nf_conntrack_irc.c
+++ b/net/netfilter/nf_conntrack_irc.c
@@ -265,7 +265,7 @@ static int __init nf_conntrack_irc_init(void)
 		if (ports[i] == IRC_PORT)
 			sprintf(irc[i].name, "irc");
 		else
-			sprintf(irc[i].name, "irc-%u", i);
+			sprintf(irc[i].name, "irc-%u", ports[i]);
 
 		ret = nf_conntrack_helper_register(&irc[i]);
 		if (ret) {
diff --git a/net/netfilter/nf_conntrack_sip.c b/net/netfilter/nf_conntrack_sip.c
index 3e06402..d523052 100644
--- a/net/netfilter/nf_conntrack_sip.c
+++ b/net/netfilter/nf_conntrack_sip.c
@@ -1661,7 +1661,7 @@ static int __init nf_conntrack_sip_init(void)
 			if (ports[i] == SIP_PORT)
 				sprintf(sip[i][j].name, "sip");
 			else
-				sprintf(sip[i][j].name, "sip-%u", i);
+				sprintf(sip[i][j].name, "sip-%u", ports[i]);
 
 			pr_debug("port #%u: %u\n", i, ports[i]);
 
diff --git a/net/netfilter/nf_conntrack_tftp.c b/net/netfilter/nf_conntrack_tftp.c
index 36f9640..47239fb 100644
--- a/net/netfilter/nf_conntrack_tftp.c
+++ b/net/netfilter/nf_conntrack_tftp.c
@@ -136,7 +136,7 @@ static int __init nf_conntrack_tftp_init(void)
 			if (ports[i] == TFTP_PORT)
 				sprintf(tftp[i][j].name, "tftp");
 			else
-				sprintf(tftp[i][j].name, "tftp-%u", i);
+				sprintf(tftp[i][j].name, "tftp-%u", ports[i]);
 
 			ret = nf_conntrack_helper_register(&tftp[i][j]);
 			if (ret) {
-- 
2.7.4


             reply	other threads:[~2016-05-14 13:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-14 13:19 Taehee Yoo [this message]
2016-05-17 10:38 ` [PATCH 1/2] netfilter: helper: Fix incorrect helper name Pablo Neira Ayuso
2016-05-22 15:03   ` Taehee Yoo
2016-05-24  9:23     ` Pablo Neira Ayuso
     [not found]       ` <CA+6hz4p6Tf8+Hy2hThCYOtU1MP-+ptF5t63QVRqH2TUi__bL+Q@mail.gmail.com>
2016-05-24  9:44         ` Pablo Neira Ayuso
     [not found]     ` <CA+6hz4r2KFBgBqA2sYKZAUO2ZUFNSnywEc7f24Y9VyZVbbULBA@mail.gmail.com>
2016-05-29 15:29       ` Taehee Yoo

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=1463231956-26867-1-git-send-email-ap420073@gmail.com \
    --to=ap420073@gmail.com \
    --cc=kaber@trash.net \
    --cc=kadlec@blackhole.kfki.hu \
    --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).