From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Krzysztof Oledzki <ole@ans.pl>
Cc: Netfilter Development Mailinglist <netfilter-devel@vger.kernel.org>
Subject: Re: [PATCH][libnetfilter_conntrack] add support for explicit helper assignment
Date: Thu, 09 Oct 2008 18:59:22 +0200 [thread overview]
Message-ID: <48EE386A.1010602@netfilter.org> (raw)
In-Reply-To: <alpine.LNX.1.10.0810091814490.13257@bizon.gios.gov.pl>
Krzysztof Oledzki wrote:
>> diff --git a/src/conntrack/build.c b/src/conntrack/build.c
>> index 1bc87f9..8c7cb7f 100644
>> --- a/src/conntrack/build.c
>> +++ b/src/conntrack/build.c
>> @@ -308,6 +308,38 @@ void __build_secmark(struct nfnlhdr *req,
>> nfnl_addattr32(&req->nlh, size, CTA_SECMARK, htonl(ct->secmark));
>> }
>>
>> +const char *helper_id_to_name[] = {
>> + [NFCT_HELPER_UNSPEC] = "unknown-helper",
>> + [NFCT_HELPER_AMANDA] = "amanda",
>> + [NFCT_HELPER_FTP] = "ftp",
>> + [NFCT_HELPER_H323] = "h323",
>> + [NFCT_HELPER_IRC] = "irc",
>> + [NFCT_HELPER_NETBIOS_NS] = "netbios_ns",
>> + [NFCT_HELPER_PPTP] = "pptp",
>> + [NFCT_HELPER_SANE] = "sane",
>> + [NFCT_HELPER_SIP] = "sip",
>> + [NFCT_HELPER_TFTP] = "tftp",
>> +};
>> +
>
> Any chances to make it more frendly to new helpers and compatible with
> out-of-tree helpers by registering a name directly from a helper and
> using it? We may for example introduce something like /proc/net/nf_helpers.
We may directly set the name of the helper using the string that
identifies it instead of this id. However, this means more memory
consumption but more flexibility. I have another patch here that uses
strings to do so. The problem is that helpers doesn't have a limitation
in the name length and I don't like the idea of having a field
"helper_name" with variable length inside the nf_conntrack object. We
could make some reasonable assumptions, like considering that the helper
name would not be larger than 32 bytes.
Using this patch, the new helpers would need a new version of the
library as you have said. However, the argument of supporting
out-of-tree helpers doesn't convince me, what out-of-tree helpers are
you refering to?
BTW, the patch is not yet applied anyway.
--
"Los honestos son inadaptados sociales" -- Les Luthiers
next prev parent reply other threads:[~2008-10-09 17:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-09 10:35 [PATCH][libnetfilter_conntrack] add support for explicit helper assignment Pablo Neira Ayuso
2008-10-09 16:26 ` Krzysztof Oledzki
2008-10-09 16:59 ` Pablo Neira Ayuso [this message]
2008-10-09 17:15 ` Krzysztof Oledzki
2008-10-09 20:30 ` Jan Engelhardt
2008-10-10 13:02 ` Patrick McHardy
2008-10-11 12:44 ` 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=48EE386A.1010602@netfilter.org \
--to=pablo@netfilter.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=ole@ans.pl \
/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