From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robbie Dinn Subject: Re: PPTP conntrack for kernel 2.6 Date: Tue, 17 Aug 2004 09:58:37 +0100 Sender: netfilter-devel-admin@lists.netfilter.org Message-ID: <4121C8BD.5030203@microbus.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Return-path: To: netfilter-devel@lists.netfilter.org In-Reply-To: Errors-To: netfilter-devel-admin@lists.netfilter.org List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: List-Id: netfilter-devel.vger.kernel.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. 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?