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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html