diff --git a/sys/netinet/sctp_usrreq.c b/sys/netinet/sctp_usrreq.c index a70ccbcf2ca6..b433df57a594 100644 --- a/sys/netinet/sctp_usrreq.c +++ b/sys/netinet/sctp_usrreq.c @@ -220,11 +220,11 @@ sctp_notify(struct sctp_inpcb *inp, timer_stopped = 0; } /* Update the path MTU. */ + if (net->port) { + next_mtu -= sizeof(struct udphdr); + } if (net->mtu > next_mtu) { net->mtu = next_mtu; - if (net->port) { - net->mtu -= sizeof(struct udphdr); - } } /* Update the association MTU */ if (stcb->asoc.smallest_mtu > next_mtu) { diff --git a/sys/netinet6/sctp6_usrreq.c b/sys/netinet6/sctp6_usrreq.c index 02310c9eb7bc..054b4c1b06a5 100644 --- a/sys/netinet6/sctp6_usrreq.c +++ b/sys/netinet6/sctp6_usrreq.c @@ -237,11 +237,11 @@ sctp6_notify(struct sctp_inpcb *inp, timer_stopped = 0; } /* Update the path MTU. */ + if (net->port) { + next_mtu -= sizeof(struct udphdr); + } if (net->mtu > next_mtu) { net->mtu = next_mtu; - if (net->port) { - net->mtu -= sizeof(struct udphdr); - } } /* Update the association MTU */ if (stcb->asoc.smallest_mtu > next_mtu) {