diff options
author | Michael Tuexen <tuexen@FreeBSD.org> | 2019-02-05 10:29:31 +0000 |
---|---|---|
committer | Michael Tuexen <tuexen@FreeBSD.org> | 2019-02-05 10:29:31 +0000 |
commit | baed5270e1a6863444b97ccb107d08b317eb84a3 (patch) | |
tree | ff8dc77644676be2120f74db81a398e32f8fbc70 /sys/netinet/sctp_output.c | |
parent | e4c42fa266eae1a26cd6a429ad265ddfc399f3b7 (diff) | |
download | src-test2-baed5270e1a6863444b97ccb107d08b317eb84a3.tar.gz src-test2-baed5270e1a6863444b97ccb107d08b317eb84a3.zip |
Notes
Diffstat (limited to 'sys/netinet/sctp_output.c')
-rw-r--r-- | sys/netinet/sctp_output.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c index 7fe1b2107e12..0f496dd4e90b 100644 --- a/sys/netinet/sctp_output.c +++ b/sys/netinet/sctp_output.c @@ -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 && |