From d274bcc6613fffa86bc1fed4a4adaf5987bd9736 Mon Sep 17 00:00:00 2001 From: Michael Tuexen Date: Wed, 26 Apr 2017 20:21:05 +0000 Subject: Fix an issue with MTU calculation if an ICMP messaeg is received for an SCTP/UDP packet. MFC after: 1 week --- sys/netinet/sctp_usrreq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/netinet/sctp_usrreq.c') 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) { -- cgit v1.2.3