|
@@ -1620,6 +1620,18 @@ static inline void tcp_highest_sack_combine(struct sock *sk,
|
|
tcp_sk(sk)->highest_sack = new;
|
|
tcp_sk(sk)->highest_sack = new;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+/* This helper checks if socket has IP_TRANSPARENT set */
|
|
|
|
+static inline bool inet_sk_transparent(const struct sock *sk)
|
|
|
|
+{
|
|
|
|
+ switch (sk->sk_state) {
|
|
|
|
+ case TCP_TIME_WAIT:
|
|
|
|
+ return inet_twsk(sk)->tw_transparent;
|
|
|
|
+ case TCP_NEW_SYN_RECV:
|
|
|
|
+ return inet_rsk(inet_reqsk(sk))->no_srccheck;
|
|
|
|
+ }
|
|
|
|
+ return inet_sk(sk)->transparent;
|
|
|
|
+}
|
|
|
|
+
|
|
/* Determines whether this is a thin stream (which may suffer from
|
|
/* Determines whether this is a thin stream (which may suffer from
|
|
* increased latency). Used to trigger latency-reducing mechanisms.
|
|
* increased latency). Used to trigger latency-reducing mechanisms.
|
|
*/
|
|
*/
|