Author: tuexen
Date: Tue Feb 5 10:29:31 2019
New Revision: 343770
URL: https://svnweb.freebsd.org/changeset/base/343770
Log:
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.
MFC after: 3 days
Modified:
head/sys/netinet/sctp_output.c
Modified: head/sys/netinet/sctp_output.c
==============================================================================
--- head/sys/netinet/sctp_output.c Tue Feb 5 10:13:51 2019
(r343769)
+++ head/sys/netinet/sctp_output.c Tue Feb 5 10:29:31 2019
(r343770)
@@ -4289,10 +4289,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 */
@@ -4647,10 +4649,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 &&
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"