diff --git a/gtests/net/packetdrill/sctp_chunk_to_string.c b/gtests/net/packetdrill/sctp_chunk_to_string.c index ab647ae7de6e5d3307cc4a937aa8288be64404ae..190be82a955f378cfc05be3c38eff3b9ef72824c 100644 --- a/gtests/net/packetdrill/sctp_chunk_to_string.c +++ b/gtests/net/packetdrill/sctp_chunk_to_string.c @@ -339,7 +339,7 @@ static int sctp_outgoing_ssn_reset_request_parameter_to_string( fputs("sids=[", s); for(len = 0; len < ((length-16)/sizeof(u16)); len++) { u16 sid; - sid = ntohs(parameter->sids[len]); + sid = ntohs((u16)(parameter->sids)[len]); if (len > 0) fprintf(s, ", "); fprintf(s, "%hu", sid); diff --git a/gtests/net/packetdrill/sctp_packet.c b/gtests/net/packetdrill/sctp_packet.c index 2c5232c06d31bb31f89016ffb73899ee9c40bb8e..6e61ad52f0a3ce97225e087567d4209060240465 100644 --- a/gtests/net/packetdrill/sctp_packet.c +++ b/gtests/net/packetdrill/sctp_packet.c @@ -1834,7 +1834,7 @@ sctp_outgoing_ssn_reset_request_parameter_new(s64 reqsn, s64 respsn, s64 last_ts if (sids != NULL) { struct sctp_u16_list_item *item; for (item = sids->first; item != NULL; item = item->next) { - parameter->sids[i] = item->value; + parameter->sids[i++] = htons(item->value); } } @@ -1870,7 +1870,7 @@ sctp_incoming_ssn_reset_request_parameter_new(s64 reqsn, struct sctp_u16_list *s if (sids != NULL) { struct sctp_u16_list_item *item; for (item = sids->first; item != NULL; item = item->next) { - parameter->sids[i] = item->value; + parameter->sids[i++] = htons(item->value); } } return sctp_parameter_list_item_new((struct sctp_parameter *)parameter, diff --git a/gtests/net/packetdrill/tests/bsd/sctp/sctp_reconfig/add_outgoing_streams.pkt b/gtests/net/packetdrill/tests/bsd/sctp/sctp_reconfig/add_outgoing_streams.pkt index 88f99244b6499152afd5d629555f53b0f4c24f0f..18d5175b2a3ae3f43da376275795a18633493b04 100644 --- a/gtests/net/packetdrill/tests/bsd/sctp/sctp_reconfig/add_outgoing_streams.pkt +++ b/gtests/net/packetdrill/tests/bsd/sctp/sctp_reconfig/add_outgoing_streams.pkt @@ -5,8 +5,8 @@ +0.0 fcntl(3, F_GETFL) = 0x02 (flags O_RDWR) +0.0 fcntl(3, F_SETFL, O_RDWR | O_NONBLOCK) = 0 -+0.0 setsockopt(3, IPPROTO_SCTP, SCTP_ENABLE_STREAM_RESET, {assoc_id=3, assoc_value=SCTP_ENABLE_RESET_STREAM_REQ}, 8) = 0 -+0.0 getsockopt(3, IPPROTO_SCTP, SCTP_ENABLE_STREAM_RESET, {assoc_id=3, assoc_value=SCTP_ENABLE_RESET_STREAM_REQ}, [8]) = 0 ++0.0 setsockopt(3, IPPROTO_SCTP, SCTP_ENABLE_STREAM_RESET, {assoc_id=3, assoc_value=SCTP_ENABLE_CHANGE_ASSOC_REQ}, 8) = 0 ++0.0 getsockopt(3, IPPROTO_SCTP, SCTP_ENABLE_STREAM_RESET, {assoc_id=3, assoc_value=SCTP_ENABLE_CHANGE_ASSOC_REQ}, [8]) = 0 // Trigger the active associtation setup +0.1 connect(3, ..., ...) = -1 EINPROGRESS (Operation now in progress)