Re: TCP-packet with PUSH flag with wrong payload data in LOCAL_OUT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thursday 2009-01-22 17:54, Vladimir Kobylyanskiy wrote:
>
>> Very well. But there still is another case I can think of -
>> non-linear skb.
>> 	struct tcphdr tcpbuf;
>> 	const struct tcphdr *th;
>> 	
>> 	th = skb_header_pointer(skb, ip_hdrlen(skb), sizeof(tcpbuf), &tcpbuf);
>> 	if (th->psh && ntohs(tcp->dest) == 80) {
>> 		char n[4];
>> 		if (skb_copy_bits(skb, ip_hdrlen(skb) + 4*tcp->doff,
>> 		    n, sizeof(n)) >= 0)
>> 			printk("data: %02x %02x %02x %02x\n", n[0], n[1],
>> 			       n[2], n[3]);
>> 	}
>
>Yes! It is non-linear skb! All works! THANK YOU VERY MUCH!
>I try to fix this bug for about 2 weeks. And You fix it for 15 minutes!
>Non of my books tell me about non-linear skb.

I suggest my very own 
http://jengelh.medozas.de/Netfilter_Modules.pdf

supplemental to that one might want to read "Linux Networking Internals" 
as published by O'Reilly, though, it is based on 2.6.14 and one needs 
to think a fair bit to make it applicable to 14 releases later that we 
had.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux