aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/inet_sock.h
diff options
context:
space:
mode:
authorKOVACS Krisztian <hidden@sch.bme.hu>2008-10-01 10:41:00 -0400
committerDavid S. Miller <davem@davemloft.net>2008-10-01 10:41:00 -0400
commit88ef4a5a78e63420dd1dd770f1bd1dc198926b04 (patch)
tree42409d6d26fb6f954c501ac156d34265437d18f9 /include/net/inet_sock.h
parent79876874ce20d37ecdc7f481ebf142466999152f (diff)
tcp: Handle TCP SYN+ACK/ACK/RST transparency
The TCP stack sends out SYN+ACK/ACK/RST reply packets in response to incoming packets. The non-local source address check on output bites us again, as replies for transparently redirected traffic won't have a chance to leave the node. This patch selectively sets the FLOWI_FLAG_ANYSRC flag when doing the route lookup for those replies. Transparent replies are enabled if the listening socket has the transparent socket flag set. 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.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h
index 139b78b4dfeb..dced3f64f975 100644
--- a/include/net/inet_sock.h
+++ b/include/net/inet_sock.h
@@ -72,7 +72,8 @@ struct inet_request_sock {
72 sack_ok : 1, 72 sack_ok : 1,
73 wscale_ok : 1, 73 wscale_ok : 1,
74 ecn_ok : 1, 74 ecn_ok : 1,
75 acked : 1; 75 acked : 1,
76 no_srccheck: 1;
76 struct ip_options *opt; 77 struct ip_options *opt;
77}; 78};
78 79
@@ -204,4 +205,9 @@ static inline struct request_sock *inet_reqsk_alloc(struct request_sock_ops *ops
204 return req; 205 return req;
205} 206}
206 207
208static inline __u8 inet_sk_flowi_flags(const struct sock *sk)
209{
210 return inet_sk(sk)->transparent ? FLOWI_FLAG_ANYSRC : 0;
211}
212
207#endif /* _INET_SOCK_H */ 213#endif /* _INET_SOCK_H */