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
This commit is contained in:
Michael Tuexen 2019-02-05 10:29:31 +00:00
parent e4c42fa266
commit baed5270e1

@ -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 &&