diff options
author | melifaro <melifaro@FreeBSD.org> | 2014-10-09 15:35:28 +0000 |
---|---|---|
committer | melifaro <melifaro@FreeBSD.org> | 2014-10-09 15:35:28 +0000 |
commit | d23efba7dd470e247cbcacf9ec6cf642d02d5b8c (patch) | |
tree | 6d2822f6a5ff6c5c487b859a557d076b53b03c46 /sys/netinet/tcp_output.c | |
parent | cab1d703b61e2216f130c6d1a23ca70b2b322386 (diff) | |
parent | c47600c4ec062b8225ac1d48197a2a1de778760d (diff) | |
download | FreeBSD-src-d23efba7dd470e247cbcacf9ec6cf642d02d5b8c.zip FreeBSD-src-d23efba7dd470e247cbcacf9ec6cf642d02d5b8c.tar.gz |
Sync to HEAD@r272825.
Diffstat (limited to 'sys/netinet/tcp_output.c')
-rw-r--r-- | sys/netinet/tcp_output.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index 07dd5c3..7db0e50 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -675,6 +675,12 @@ just_return: send: SOCKBUF_LOCK_ASSERT(&so->so_snd); + if (len > 0) { + if (len >= tp->t_maxseg) + tp->t_flags2 |= TF2_PLPMTU_MAXSEGSNT; + else + tp->t_flags2 &= ~TF2_PLPMTU_MAXSEGSNT; + } /* * Before ESTABLISHED, force sending of initial options * unless TCP set not to do any options. @@ -1303,8 +1309,12 @@ send: * * NB: Don't set DF on small MTU/MSS to have a safe fallback. */ - if (V_path_mtu_discovery && tp->t_maxopd > V_tcp_minmss) + if (V_path_mtu_discovery && tp->t_maxopd > V_tcp_minmss) { ip->ip_off |= htons(IP_DF); + tp->t_flags2 |= TF2_PLPMTU_PMTUD; + } else { + tp->t_flags2 &= ~TF2_PLPMTU_PMTUD; + } if (tp->t_state == TCPS_SYN_SENT) TCP_PROBE5(connect__request, NULL, tp, ip, tp, th); |