All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robbie Dinn <robbie@microbus.com>
To: netfilter-devel@lists.netfilter.org
Subject: Re: PPTP conntrack for kernel 2.6
Date: Tue, 17 Aug 2004 09:58:37 +0100	[thread overview]
Message-ID: <4121C8BD.5030203@microbus.com> (raw)
In-Reply-To: <cfdmen$3hu$1@sea.gmane.org>

Laurens Blankers wrote:
> Could someone please port the pptp conntrack module to kernel 2.6?

I thought I would have a go at this. It is a bit harder to do
than I thought.

<aside>
At the moment I am stuck trying to fix up function gre_manip_pkt()
in ip_nat_proto_gre.c . I can change the function parameter to
match the function prototype, but I don't know to fix the code
in the body of the function.

I tried looking at functions udp_manip_pkt() and tcp_manip_pkt()
for guidance (in files ip_nat_protocol_{udp|tcp}.c), but I am still
confused.
</aside>

I think I might have spotted something that looks a bit strange,
maybe even a bug? Please bear in mind that I don't understand the
code.

Both udp_manip_pkt() and tcp_manip_pkt() make a call to
skb_ip_make_writable(). It is the second parameter passed to
skb_ip_make_writable() that I am worried about.

In udp_manip_pkt() it is called like this:

      if (!skb_ip_make_writable(pskb, hdroff + sizeof(hdr)))

where hdr is a pointer to a struct udphdr

In tcp_manip_pkt() it is called like this:

      if (!skb_ip_make_writable(pskb, hdroff + hdrsize))

where hdrsize may have a value of sizeof(tcphdr)

I am worried that sizeof(struct udphdr) and sizeof(struct udphdr *)
are different things.

Have I found a bug or am I simply confused?

  reply	other threads:[~2004-08-17  8:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-11 17:53 PPTP conntrack for kernel 2.6 Laurens Blankers
2004-08-17  8:58 ` Robbie Dinn [this message]
2004-08-19 11:23   ` Harald Welte

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=4121C8BD.5030203@microbus.com \
    --to=robbie@microbus.com \
    --cc=netfilter-devel@lists.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 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.