aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/sctp_usrreq.c
diff options
context:
space:
mode:
authorMichael Tuexen <tuexen@FreeBSD.org>2017-04-26 20:21:05 +0000
committerMichael Tuexen <tuexen@FreeBSD.org>2017-04-26 20:21:05 +0000
commitd274bcc6613fffa86bc1fed4a4adaf5987bd9736 (patch)
tree0579c97b3b6c95e3838be017cd59b2c683344b5d /sys/netinet/sctp_usrreq.c
parent4f4acb65e8f2f63d8cae1a9459566d6f60f3e95c (diff)
downloadsrc-d274bcc6613fffa86bc1fed4a4adaf5987bd9736.tar.gz
src-d274bcc6613fffa86bc1fed4a4adaf5987bd9736.zip
Fix an issue with MTU calculation if an ICMP messaeg is received
for an SCTP/UDP packet. MFC after: 1 week
Notes
Notes: svn path=/head/; revision=317464
Diffstat (limited to 'sys/netinet/sctp_usrreq.c')
-rw-r--r--sys/netinet/sctp_usrreq.c6
1 files changed, 3 insertions, 3 deletions
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) {