summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/inet/tcp/tcp_input.c
diff options
context:
space:
mode:
authorPatrick Mooney <pmooney@pfmooney.com>2017-02-22 20:22:43 +0000
committerPatrick Mooney <pmooney@pfmooney.com>2017-02-24 19:57:23 +0000
commit012f57fdf5877c9e9059a07d4a2e1f05bb575540 (patch)
treebe1148c60e4649938a8eff74a33b403629d0cc7a /usr/src/uts/common/inet/tcp/tcp_input.c
parentd995dda41781c812878c84191b0e974aacb0cad0 (diff)
downloadillumos-joyent-012f57fdf5877c9e9059a07d4a2e1f05bb575540.tar.gz
OS-5978 ICMP-initiated TCP retransmits should trigger only when MTU decreases
Reviewed by: Dan McDonald <danmcd@omniti.com> Reviewed by: Robert Mustacchi <rm@joyent.com> Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com> Approved by: Jerry Jelinek <jerry.jelinek@joyent.com>
Diffstat (limited to 'usr/src/uts/common/inet/tcp/tcp_input.c')
-rw-r--r--usr/src/uts/common/inet/tcp/tcp_input.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/usr/src/uts/common/inet/tcp/tcp_input.c b/usr/src/uts/common/inet/tcp/tcp_input.c
index 37e4d72745..1157023ab2 100644
--- a/usr/src/uts/common/inet/tcp/tcp_input.c
+++ b/usr/src/uts/common/inet/tcp/tcp_input.c
@@ -22,7 +22,7 @@
/*
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
- * Copyright 2016 Joyent, Inc.
+ * Copyright 2017 Joyent, Inc.
* Copyright (c) 2014 by Delphix. All rights reserved.
*/
@@ -5562,10 +5562,12 @@ noticmpv4:
switch (icmph->icmph_code) {
case ICMP_FRAGMENTATION_NEEDED:
/*
- * Update Path MTU, then try to send something out.
+ * Attempt to update path MTU and, if the MSS of the
+ * connection is altered, retransmit outstanding data.
*/
- tcp_update_pmtu(tcp, B_TRUE);
- tcp_rexmit_after_error(tcp);
+ if (tcp_update_pmtu(tcp, B_TRUE)) {
+ tcp_rexmit_after_error(tcp);
+ }
break;
case ICMP_PORT_UNREACHABLE:
case ICMP_PROTOCOL_UNREACHABLE:
@@ -5608,7 +5610,7 @@ noticmpv4:
break;
}
break;
- case ICMP_SOURCE_QUENCH: {
+ case ICMP_SOURCE_QUENCH:
/*
* use a global boolean to control
* whether TCP should respond to ICMP_SOURCE_QUENCH.
@@ -5629,7 +5631,6 @@ noticmpv4:
}
break;
}
- }
freemsg(mp);
}
@@ -5682,10 +5683,12 @@ noticmpv6:
switch (icmp6->icmp6_type) {
case ICMP6_PACKET_TOO_BIG:
/*
- * Update Path MTU, then try to send something out.
+ * Attempt to update path MTU and, if the MSS of the connection
+ * is altered, retransmit outstanding data.
*/
- tcp_update_pmtu(tcp, B_TRUE);
- tcp_rexmit_after_error(tcp);
+ if (tcp_update_pmtu(tcp, B_TRUE)) {
+ tcp_rexmit_after_error(tcp);
+ }
break;
case ICMP6_DST_UNREACH:
switch (icmp6->icmp6_code) {