summaryrefslogtreecommitdiffstats
path: root/sys/netinet/sctputil.c
diff options
context:
space:
mode:
authortuexen <tuexen@FreeBSD.org>2016-12-18 13:48:28 +0000
committertuexen <tuexen@FreeBSD.org>2016-12-18 13:48:28 +0000
commitb352adc836074b759a03e038c5e887c8dbf0d6c6 (patch)
treee7fe36fd4c384191f747e6b0fe23b418634e942e /sys/netinet/sctputil.c
parentb7a9f0370e066a1551da58335559dcccc8a27527 (diff)
downloadFreeBSD-src-b352adc836074b759a03e038c5e887c8dbf0d6c6.zip
FreeBSD-src-b352adc836074b759a03e038c5e887c8dbf0d6c6.tar.gz
MFC r309851:
Ensure that the reported ppid and tsn are taken from the first fragment. This fixes a bug where the wrong ppid was reported, if * I-DATA was used on the first fragement was not received first * DATA was used and different ppids where used. Thanks to Julian Cordes for making me aware of the issue.
Diffstat (limited to 'sys/netinet/sctputil.c')
-rw-r--r--sys/netinet/sctputil.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c
index 61d3732..b4f6c1f 100644
--- a/sys/netinet/sctputil.c
+++ b/sys/netinet/sctputil.c
@@ -4639,7 +4639,7 @@ sctp_generate_no_user_data_cause(uint32_t tsn)
no_user_data_cause = mtod(m, struct sctp_error_no_user_data *);
no_user_data_cause->cause.code = htons(SCTP_CAUSE_NO_USER_DATA);
no_user_data_cause->cause.length = htons(len);
- no_user_data_cause->tsn = tsn; /* tsn is passed in as NBO */
+ no_user_data_cause->tsn = htonl(tsn);
}
return (m);
}
OpenPOWER on IntegriCloud