diff options
Diffstat (limited to 'net/sctp/transport.c')
-rw-r--r-- | net/sctp/transport.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/sctp/transport.c b/net/sctp/transport.c index 5c29b14ee9af..e5dde45c79d3 100644 --- a/net/sctp/transport.c +++ b/net/sctp/transport.c | |||
@@ -543,8 +543,8 @@ void sctp_transport_lower_cwnd(struct sctp_transport *transport, | |||
543 | * congestion indications more than once every window of | 543 | * congestion indications more than once every window of |
544 | * data (or more loosely more than once every round-trip time). | 544 | * data (or more loosely more than once every round-trip time). |
545 | */ | 545 | */ |
546 | if ((jiffies - transport->last_time_ecne_reduced) > | 546 | if (time_after(jiffies, transport->last_time_ecne_reduced + |
547 | transport->rtt) { | 547 | transport->rtt)) { |
548 | transport->ssthresh = max(transport->cwnd/2, | 548 | transport->ssthresh = max(transport->cwnd/2, |
549 | 4*transport->asoc->pathmtu); | 549 | 4*transport->asoc->pathmtu); |
550 | transport->cwnd = transport->ssthresh; | 550 | transport->cwnd = transport->ssthresh; |
@@ -561,7 +561,8 @@ void sctp_transport_lower_cwnd(struct sctp_transport *transport, | |||
561 | * to be done every RTO interval, we do it every hearbeat | 561 | * to be done every RTO interval, we do it every hearbeat |
562 | * interval. | 562 | * interval. |
563 | */ | 563 | */ |
564 | if ((jiffies - transport->last_time_used) > transport->rto) | 564 | if (time_after(jiffies, transport->last_time_used + |
565 | transport->rto)) | ||
565 | transport->cwnd = max(transport->cwnd/2, | 566 | transport->cwnd = max(transport->cwnd/2, |
566 | 4*transport->asoc->pathmtu); | 567 | 4*transport->asoc->pathmtu); |
567 | break; | 568 | break; |