aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/sctp_usrreq.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet/sctp_usrreq.c')
-rw-r--r--sys/netinet/sctp_usrreq.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/netinet/sctp_usrreq.c b/sys/netinet/sctp_usrreq.c
index add1c95273c4..b433df57a594 100644
--- a/sys/netinet/sctp_usrreq.c
+++ b/sys/netinet/sctp_usrreq.c
@@ -152,7 +152,7 @@ sctp_notify(struct sctp_inpcb *inp,
uint8_t icmp_type,
uint8_t icmp_code,
uint16_t ip_len,
- uint16_t next_mtu)
+ uint32_t next_mtu)
{
#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING)
struct socket *so;
@@ -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) {
@@ -328,7 +328,7 @@ sctp_ctlinput(int cmd, struct sockaddr *sa, void *vip)
icmp->icmp_type,
icmp->icmp_code,
ntohs(inner_ip->ip_len),
- ntohs(icmp->icmp_nextmtu));
+ (uint32_t)ntohs(icmp->icmp_nextmtu));
} else {
if ((stcb == NULL) && (inp != NULL)) {
/* reduce ref-count */