aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/inet_sock.h
diff options
context:
space:
mode:
authorKOVACS Krisztian <hidden@sch.bme.hu>2008-10-01 10:46:49 -0400
committerDavid S. Miller <davem@davemloft.net>2008-10-01 10:46:49 -0400
commita3116ac5c216fc3c145906a46df9ce542ff7dcf2 (patch)
tree6b2b43b5bacac2b358566e4b7ca0adda45a3e52b /include/net/inet_sock.h
parent86b08d867d7de001ab224180ed7865fab93fd56e (diff)
tcp: Port redirection support for TCP
Current TCP code relies on the local port of the listening socket being the same as the destination address of the incoming connection. Port redirection used by many transparent proxying techniques obviously breaks this, so we have to store the original destination port address. This patch extends struct inet_request_sock and stores the incoming destination port value there. It also modifies the handshake code to use that value as the source port when sending reply packets. Signed-off-by: KOVACS Krisztian <hidden@sch.bme.hu> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/inet_sock.h')
-rw-r--r--include/net/inet_sock.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h
index dced3f64f975..de0ecc71cf03 100644
--- a/include/net/inet_sock.h
+++ b/include/net/inet_sock.h
@@ -61,8 +61,8 @@ struct inet_request_sock {
61 struct request_sock req; 61 struct request_sock req;
62#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) 62#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
63 u16 inet6_rsk_offset; 63 u16 inet6_rsk_offset;
64 /* 2 bytes hole, try to pack */
65#endif 64#endif
65 __be16 loc_port;
66 __be32 loc_addr; 66 __be32 loc_addr;
67 __be32 rmt_addr; 67 __be32 rmt_addr;
68 __be16 rmt_port; 68 __be16 rmt_port;