aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/tcp_var.h
diff options
context:
space:
mode:
authorMichael Tuexen <tuexen@FreeBSD.org>2018-08-19 14:56:10 +0000
committerMichael Tuexen <tuexen@FreeBSD.org>2018-08-19 14:56:10 +0000
commit8e02b4e00cc590bdd018b9c7cf08f5f5fd4f0e47 (patch)
treeab4a5e238303baaf65a9920f035e4263244c988f /sys/netinet/tcp_var.h
parent63d8b6ea21d8a40fcc8416ef03ecc4aed1fe4c77 (diff)
downloadsrc-8e02b4e00cc590bdd018b9c7cf08f5f5fd4f0e47.tar.gz
src-8e02b4e00cc590bdd018b9c7cf08f5f5fd4f0e47.zip
Don't expose the uptime via the TCP timestamps.
The TCP client side or the TCP server side when not using SYN-cookies used the uptime as the TCP timestamp value. This patch uses in all cases an offset, which is the result of a keyed hash function taking the source and destination addresses and port numbers into account. The keyed hash function is the same a used for the initial TSN. Reviewed by: rrs@ MFC after: 1 month Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D16636
Notes
Notes: svn path=/head/; revision=338053
Diffstat (limited to 'sys/netinet/tcp_var.h')
-rw-r--r--sys/netinet/tcp_var.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h
index c0f870ad6e10..5f8c0ade6700 100644
--- a/sys/netinet/tcp_var.h
+++ b/sys/netinet/tcp_var.h
@@ -923,7 +923,9 @@ void tcp_hc_updatemtu(struct in_conninfo *, uint32_t);
void tcp_hc_update(struct in_conninfo *, struct hc_metrics_lite *);
extern struct pr_usrreqs tcp_usrreqs;
-tcp_seq tcp_new_isn(struct tcpcb *);
+
+uint32_t tcp_new_ts_offset(struct in_conninfo *);
+tcp_seq tcp_new_isn(struct in_conninfo *);
int tcp_sack_doack(struct tcpcb *, struct tcpopt *, tcp_seq);
void tcp_update_sack_list(struct tcpcb *tp, tcp_seq rcv_laststart, tcp_seq rcv_lastend);