mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-18 10:35:55 +00:00
Correct an edge case in tcp_mss() where the cached path MTU
from tcp_hostcache would have overridden a (now) lower MTU of an interface or route that changed since first PMTU discovery. The bug would have caused TCP to redo the PMTU discovery when not strictly necessary. Make a comment about already pre-initialized default values more clear. Reviewed by: sam
This commit is contained in:
parent
48bd0712bc
commit
2d166c0202
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=128592
@ -2793,7 +2793,7 @@ tcp_mss(tp, offer)
|
|||||||
so = inp->inp_socket;
|
so = inp->inp_socket;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* no route to sender, take default mss and return
|
* no route to sender, stay with default mss and return
|
||||||
*/
|
*/
|
||||||
if (maxmtu == 0)
|
if (maxmtu == 0)
|
||||||
return;
|
return;
|
||||||
@ -2851,7 +2851,7 @@ tcp_mss(tp, offer)
|
|||||||
* else, use the link mtu.
|
* else, use the link mtu.
|
||||||
*/
|
*/
|
||||||
if (metrics.rmx_mtu)
|
if (metrics.rmx_mtu)
|
||||||
mss = metrics.rmx_mtu - min_protoh;
|
mss = min(metrics.rmx_mtu, maxmtu) - min_protoh;
|
||||||
else {
|
else {
|
||||||
#ifdef INET6
|
#ifdef INET6
|
||||||
if (isipv6) {
|
if (isipv6) {
|
||||||
|
@ -2793,7 +2793,7 @@ tcp_mss(tp, offer)
|
|||||||
so = inp->inp_socket;
|
so = inp->inp_socket;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* no route to sender, take default mss and return
|
* no route to sender, stay with default mss and return
|
||||||
*/
|
*/
|
||||||
if (maxmtu == 0)
|
if (maxmtu == 0)
|
||||||
return;
|
return;
|
||||||
@ -2851,7 +2851,7 @@ tcp_mss(tp, offer)
|
|||||||
* else, use the link mtu.
|
* else, use the link mtu.
|
||||||
*/
|
*/
|
||||||
if (metrics.rmx_mtu)
|
if (metrics.rmx_mtu)
|
||||||
mss = metrics.rmx_mtu - min_protoh;
|
mss = min(metrics.rmx_mtu, maxmtu) - min_protoh;
|
||||||
else {
|
else {
|
||||||
#ifdef INET6
|
#ifdef INET6
|
||||||
if (isipv6) {
|
if (isipv6) {
|
||||||
|
Loading…
Reference in New Issue
Block a user