diff options
Diffstat (limited to 'core.c')
| -rw-r--r-- | core.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -270,6 +270,10 @@ static int __tcp_restore_fd_create(struct net *netspace, const struct tcp_restor #define TCPOPT_SACK_PERMITTED 4 #endif +#ifndef TCPOPT_TIMESTAMP +#define TCPOPT_TIMESTAMP 8 +#endif + tcp_repair_opts[nr_tcp_repair_opts].opt_code = TCPOPT_MAXSEG; tcp_repair_opts[nr_tcp_repair_opts].opt_val = min(endpoint->mss, peer->mss); nr_tcp_repair_opts++; @@ -288,6 +292,13 @@ static int __tcp_restore_fd_create(struct net *netspace, const struct tcp_restor nr_tcp_repair_opts++; } + if (endpoint->timestamp_perm && peer->timestamp_perm) + { + tcp_repair_opts[nr_tcp_repair_opts].opt_code = TCPOPT_TIMESTAMP; + tcp_repair_opts[nr_tcp_repair_opts].opt_val = 0; + nr_tcp_repair_opts++; + } + /* Bind address and connect to peer endpoint */ result = kernel_bind(__sock, (struct sockaddr *)&endpoint->addr, sizeof(endpoint->addr)); if (unlikely(result < 0)) |
