svn commit: r347085 - stable/12/sys/netinet
Michael Tuexen
tuexen at FreeBSD.org
Sat May 4 09:18:20 UTC 2019
Author: tuexen
Date: Sat May 4 09:18:19 2019
New Revision: 347085
URL: https://svnweb.freebsd.org/changeset/base/347085
Log:
MFC r343770:
Only reduce the PMTU after the send call. The only way to increase it, is
via PMTUD.
This fixes an MTU issue reported by Timo Voelker.
Modified:
stable/12/sys/netinet/sctp_output.c
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/sys/netinet/sctp_output.c
==============================================================================
--- stable/12/sys/netinet/sctp_output.c Sat May 4 09:15:57 2019 (r347084)
+++ stable/12/sys/netinet/sctp_output.c Sat May 4 09:18:19 2019 (r347085)
@@ -4287,10 +4287,12 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp,
if (net->port) {
mtu -= sizeof(struct udphdr);
}
- if ((stcb != NULL) && (stcb->asoc.smallest_mtu > mtu)) {
- sctp_mtu_size_reset(inp, &stcb->asoc, mtu);
+ if (mtu < net->mtu) {
+ if ((stcb != NULL) && (stcb->asoc.smallest_mtu > mtu)) {
+ sctp_mtu_size_reset(inp, &stcb->asoc, mtu);
+ }
+ net->mtu = mtu;
}
- net->mtu = mtu;
}
} else if (ro->ro_rt == NULL) {
/* route was freed */
@@ -4645,10 +4647,12 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp,
if (net->port) {
mtu -= sizeof(struct udphdr);
}
- if ((stcb != NULL) && (stcb->asoc.smallest_mtu > mtu)) {
- sctp_mtu_size_reset(inp, &stcb->asoc, mtu);
+ if (mtu < net->mtu) {
+ if ((stcb != NULL) && (stcb->asoc.smallest_mtu > mtu)) {
+ sctp_mtu_size_reset(inp, &stcb->asoc, mtu);
+ }
+ net->mtu = mtu;
}
- net->mtu = mtu;
}
} else if (ifp) {
if (ND_IFINFO(ifp)->linkmtu &&
More information about the svn-src-all
mailing list