summaryrefslogtreecommitdiff
path: root/sys/netinet
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/sctp_output.c16
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 &&