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>
This commit is contained in:
committed by
David S. Miller
parent
79876874ce
commit
88ef4a5a78
@@ -72,7 +72,8 @@ struct inet_request_sock {
|
||||
sack_ok : 1,
|
||||
wscale_ok : 1,
|
||||
ecn_ok : 1,
|
||||
acked : 1;
|
||||
acked : 1,
|
||||
no_srccheck: 1;
|
||||
struct ip_options *opt;
|
||||
};
|
||||
|
||||
@@ -204,4 +205,9 @@ static inline struct request_sock *inet_reqsk_alloc(struct request_sock_ops *ops
|
||||
return req;
|
||||
}
|
||||
|
||||
static inline __u8 inet_sk_flowi_flags(const struct sock *sk)
|
||||
{
|
||||
return inet_sk(sk)->transparent ? FLOWI_FLAG_ANYSRC : 0;
|
||||
}
|
||||
|
||||
#endif /* _INET_SOCK_H */
|
||||
|
Reference in New Issue
Block a user