From: Pablo Neira Ayuso <pablo@netfilter.org>
To: dccp@vger.kernel.org
Subject: Re: DCCP conntrack/NAT
Date: Sat, 05 Apr 2008 10:09:43 +0000 [thread overview]
Message-ID: <47F74FE7.2040809@netfilter.org> (raw)
In-Reply-To: <47F64C0D.5080700@trash.net>
Jan Engelhardt wrote:
>
> On Friday 2008-04-04 17:41, Patrick McHardy wrote:
>> These two patches contain my old conntrack/NAT helper for DCCP,
>> updated to net-2.6.26.git and the missing parts (almost entirely)
>> added.
>>
>> They both depend on some other netfilter patches, I've attached
>> them only hoping for some review :) A git tree which contains
>> the full set of patches is (once upload finishes) located at:
>>
>> git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-2.6.26.git
>
> Speaking of git... I noticed people.netfilter.org has a git-daemon,
> so that would be fine for iptables, no?
>
>> A few words on the patches:
>
> (Where's the SCTP patch for review? :)
>
>
>> +static int dccp_pkt_to_tuple(const struct sk_buff *skb, unsigned int
>> dataoff,
>> + struct nf_conntrack_tuple *tuple)
>> +{
>> + struct dccp_hdr _hdr, *dh;
>> +
>> + dh = skb_header_pointer(skb, dataoff, sizeof(_hdr), &_hdr);
>> + if (dh = NULL)
>> + return 0;
>> +
>> + tuple->src.u.dccp.port = dh->dccph_sport;
>> + tuple->dst.u.dccp.port = dh->dccph_dport;
>> + return 1;
>> +}
>
> Something related I have been wondering about ...
> (actually nf_conntrack_l3proto_ipv4)
Well, this is not really related with this patch, I think that it would
be a different thread since it has nothing to do with the DCCP friends.
Anyway...
> skb_header_pointer() is used for the case of a non-linear skb (has to
> do with IP fragments?).
Indeed.
> In ipv4_pkt_to_tuple in nf_conntrack_l3proto_ipv4.c,
> skb_header_pointer() is used to get the [source address of the] IP
> header. Since I figured the layer-3 header must always be
> unfragmented, would not it be simpler to use ip_hdr(), or is there
> something that mandates use of skb_header_pointer?
Right. I think that we can assume that the IP header is always linear (I
remember this from a conversation with Davem or Rusty), Patrick?
--
"Los honestos son inadaptados sociales" -- Les Luthiers
next prev parent reply other threads:[~2008-04-05 10:09 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-04 15:41 DCCP conntrack/NAT Patrick McHardy
2008-04-04 19:59 ` Jan Engelhardt
2008-04-05 10:09 ` Pablo Neira Ayuso [this message]
2008-04-05 10:12 ` Pablo Neira Ayuso
2008-04-06 0:28 ` Patrick McHardy
2008-04-07 21:50 ` Gerrit Renker
2008-04-07 22:45 ` Patrick McHardy
2008-04-08 9:27 ` Gerrit Renker
2008-04-08 10:30 ` Patrick McHardy
2008-04-08 10:33 ` Patrick McHardy
2008-04-08 11:18 ` Patrick McHardy
2008-04-08 13:38 ` Gerrit Renker
2008-04-08 14:12 ` Patrick McHardy
2008-04-08 14:26 ` Patrick McHardy
2008-04-08 16:21 ` Patrick McHardy
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=47F74FE7.2040809@netfilter.org \
--to=pablo@netfilter.org \
--cc=dccp@vger.kernel.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