Re: get tcp header

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

 



(I'm not sure I sent this mail, sorry if you already have one)

ME: in general: when i can use the skb_transport_header function?

JAN: When a transport header pointer has been set. Which is when the
appropriate layer-X function has processed it. (After ip_rcv for
example)
On the output path, since it goes in the reverse direction, it will
always be set.

so, today i checked this.
this is my iptables rule:

iptables -t filter -A OUTPUT -d 192.168.0.1 -p tcp -j TAR

and this is the code's lines of xt_TAR module

printk(KERN_INFO "xt_TAR-----> tcp header: %p\n",skb_transport_header(skb));
printk(KERN_INFO "xt_TAR-----> ip header: %p\n",skb_network_header(skb));

but the skb_transport_header returns the same value of
skb_network_header, so even though we are on the output path, the
transport_header is not set...........

what's wrong?

--
Nicola Padovano
e-mail: nicola.padovano@xxxxxxxxx
web: http://npadovano.altervista.org
--
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