From: Laszlo Attila Toth <panther@balabit.hu>
To: Jan Engelhardt <jengelh@computergmbh.de>
Cc: Patrick McHardy <kaber@trash.net>,
Netfilter Developer Mailing List
<netfilter-devel@vger.kernel.org>,
KOVACS Krisztian <hidden@sch.bme.hu>
Subject: Re: xt_owner-xt_socket plans
Date: Mon, 21 Jan 2008 12:58:26 +0100 [thread overview]
Message-ID: <479488E2.6000604@balabit.hu> (raw)
In-Reply-To: <Pine.LNX.4.64.0801211156320.24186@fbirervta.pbzchgretzou.qr>
Jan Engelhardt írta:
> On Jan 21 2008 10:11, Laszlo Attila Toth wrote:
>> http://people.netfilter.org/hidden/tproxy/tproxy4-2.6.24-200710190050.tar.bz2
>>
> In the xt_socket code, I just noticed:
>
> struct udphdr *hp;
> hp = skb_header_pointer(skb, ip_hdrlen(skb), sizeof(_hdr), &_hdr);
>
> Does that mean xt_socket only receives UDP? Also, the header should always be
> available so that skb_header_pointer is not necessary.
> Where am I being misled?
>
No, both tcp and udp packets are receiving.
Usage of udphdr is beacuse the first two members of the struct
{udp,tcp}hdr types are the same, they are the source and destionation
ports, and they are used as parameters of nf_tproxy_get_sock_v4 function:
__be16 source;
__be16 dest;
Either tcphdr or udphdr can be used, and the latter one is the simplier
type.
--
Attila
-
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2008-01-21 11:58 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-20 18:21 xt_owner-xt_socket plans Jan Engelhardt
2008-01-21 9:11 ` Laszlo Attila Toth
2008-01-21 10:58 ` Jan Engelhardt
2008-01-21 11:58 ` Laszlo Attila Toth [this message]
2008-01-21 12:20 ` KOVACS Krisztian
2008-01-21 13:16 ` Jan Engelhardt
2008-01-21 14:46 ` KOVACS Krisztian
2008-01-21 23:04 ` Jan Engelhardt
2008-01-21 13:23 ` Jan Engelhardt
2008-01-21 14:26 ` Laszlo Attila Toth
2008-01-21 23:22 ` Jan Engelhardt
2008-01-22 7:54 ` KOVACS Krisztian
2008-01-21 14:41 ` KOVACS Krisztian
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=479488E2.6000604@balabit.hu \
--to=panther@balabit.hu \
--cc=hidden@sch.bme.hu \
--cc=jengelh@computergmbh.de \
--cc=kaber@trash.net \
--cc=netfilter-devel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.