diff options
author | Wei Wang <weiwan@google.com> | 2020-09-10 02:50:46 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-09-10 22:15:40 +0200 |
commit | e9b12edc133b54e15ecd105620d51fb8e8fa8bde (patch) | |
tree | 7856c1f4c9a95b927f9cac14a7cef33842209cd3 /net/ipv4/tcp_input.c | |
parent | net: mventa: drop mvneta_stats from mvneta_swbm_rx_frame signature (diff) | |
download | linux-e9b12edc133b54e15ecd105620d51fb8e8fa8bde.tar.xz linux-e9b12edc133b54e15ecd105620d51fb8e8fa8bde.zip |
tcp: record received TOS value in the request socket
A new field is added to the request sock to record the TOS value
received on the listening socket during 3WHS:
When not under syn flood, it is recording the TOS value sent in SYN.
When under syn flood, it is recording the TOS value sent in the ACK.
This is a preparation patch in order to do TOS reflection in the later
commit.
Signed-off-by: Wei Wang <weiwan@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r-- | net/ipv4/tcp_input.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 4337841faeff..3658ad84f0c6 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -6834,6 +6834,7 @@ int tcp_conn_request(struct request_sock_ops *rsk_ops, tcp_rsk(req)->snt_isn = isn; tcp_rsk(req)->txhash = net_tx_rndhash(); + tcp_rsk(req)->syn_tos = TCP_SKB_CB(skb)->ip_dsfield; tcp_openreq_init_rwin(req, sk, dst); sk_rx_queue_set(req_to_sk(req), skb); if (!want_cookie) { |