From: Patrick McHardy <kaber@trash.net>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH] fix missing attribute in DCCP
Date: Wed, 22 Apr 2009 15:44:56 +0200 [thread overview]
Message-ID: <49EF1F58.30209@trash.net> (raw)
In-Reply-To: <20090422122306.14461.55699.stgit@Decadence>
Pablo Neira Ayuso wrote:
> Hi Patrick,
>
> While finishing the DCCP support (I think it's the last to finish
> the conntrack-tools), I notice that there's one field that is
> not exported to user-space via ctnetlink.
>
> This patch adds a couple of missing attributes that allows me to
> set the role in DCCP connections, otherwise the ctnetlink support
> is not of much help to be used by conntrackd.
>
> This can be done with only one attribute, so we can have just one
> CTA_PROTOINFO_DCCP_ROLE_ORIGINAL and set the reply as the opposite.
> However, this may look at bit inconsistent. I don't really mind
> the way this is done, just tell me I'll do it :), but I need this
> to complete DCCP support.
Indeed, this looks like an unnecessary way to do something wrong for
userspace. Since the roles are always the opposite in each direction,
we might as well change the kernel to only keep track of the role
in the original direction and use !role for the reply direction.
> + ct->proto.dccp.role[IP_CT_DIR_ORIGINAL] =
> + nla_get_u8(tb[CTA_PROTOINFO_DCCP_ROLE_ORIGINAL]);
> + ct->proto.dccp.role[IP_CT_DIR_REPLY] =
> + nla_get_u8(tb[CTA_PROTOINFO_DCCP_ROLE_REPLY]);
Validation please, incorrect values might crash the kernel.
prev parent reply other threads:[~2009-04-22 13:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-22 12:27 [PATCH] fix missing attribute in DCCP Pablo Neira Ayuso
2009-04-22 12:28 ` [PATCH] netfilter: conntrack: add missing role attributes for DCCP Pablo Neira Ayuso
2009-04-22 13:44 ` Patrick McHardy [this message]
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=49EF1F58.30209@trash.net \
--to=kaber@trash.net \
--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).