diff options
Diffstat (limited to 'net/ipv4/tcp_metrics.c')
-rw-r--r-- | net/ipv4/tcp_metrics.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/ipv4/tcp_metrics.c b/net/ipv4/tcp_metrics.c index 4fe041805989..ed9c9a91851c 100644 --- a/net/ipv4/tcp_metrics.c +++ b/net/ipv4/tcp_metrics.c | |||
@@ -576,7 +576,8 @@ reset: | |||
576 | tp->snd_cwnd_stamp = tcp_time_stamp; | 576 | tp->snd_cwnd_stamp = tcp_time_stamp; |
577 | } | 577 | } |
578 | 578 | ||
579 | bool tcp_peer_is_proven(struct request_sock *req, struct dst_entry *dst, bool paws_check) | 579 | bool tcp_peer_is_proven(struct request_sock *req, struct dst_entry *dst, |
580 | bool paws_check, bool timestamps) | ||
580 | { | 581 | { |
581 | struct tcp_metrics_block *tm; | 582 | struct tcp_metrics_block *tm; |
582 | bool ret; | 583 | bool ret; |
@@ -589,7 +590,8 @@ bool tcp_peer_is_proven(struct request_sock *req, struct dst_entry *dst, bool pa | |||
589 | if (paws_check) { | 590 | if (paws_check) { |
590 | if (tm && | 591 | if (tm && |
591 | (u32)get_seconds() - tm->tcpm_ts_stamp < TCP_PAWS_MSL && | 592 | (u32)get_seconds() - tm->tcpm_ts_stamp < TCP_PAWS_MSL && |
592 | (s32)(tm->tcpm_ts - req->ts_recent) > TCP_PAWS_WINDOW) | 593 | ((s32)(tm->tcpm_ts - req->ts_recent) > TCP_PAWS_WINDOW || |
594 | !timestamps)) | ||
593 | ret = false; | 595 | ret = false; |
594 | else | 596 | else |
595 | ret = true; | 597 | ret = true; |
@@ -1093,7 +1095,6 @@ static const struct genl_ops tcp_metrics_nl_ops[] = { | |||
1093 | .doit = tcp_metrics_nl_cmd_get, | 1095 | .doit = tcp_metrics_nl_cmd_get, |
1094 | .dumpit = tcp_metrics_nl_dump, | 1096 | .dumpit = tcp_metrics_nl_dump, |
1095 | .policy = tcp_metrics_nl_policy, | 1097 | .policy = tcp_metrics_nl_policy, |
1096 | .flags = GENL_ADMIN_PERM, | ||
1097 | }, | 1098 | }, |
1098 | { | 1099 | { |
1099 | .cmd = TCP_METRICS_CMD_DEL, | 1100 | .cmd = TCP_METRICS_CMD_DEL, |