diff --git a/gtests/net/packetdrill/parser.y b/gtests/net/packetdrill/parser.y index c8278217aa87fd33994b7a8c8449e8f86bc8952d..cda65bc31797782f1fbbbb2531e0083ebf8f3eaf 100644 --- a/gtests/net/packetdrill/parser.y +++ b/gtests/net/packetdrill/parser.y @@ -39,7 +39,7 @@ * * The semantic action code for a rule produces an output, which it * can reference using the $$ token. The set of possible types -* returned in output expressions is given in the %union section of + * returned in output expressions is given in the %union section of * the .y file. The specific type of the output for a terminal or * nonterminal symbol (corresponding to a field in the %union) is * given by the %type directive in the .y file. The action code can diff --git a/gtests/net/packetdrill/run_packet.c b/gtests/net/packetdrill/run_packet.c index cfe5faa41a98e48772df300da52f09d5042218d3..e93c4dca40aff5c80b4ca2abcdbc53cd332026b7 100644 --- a/gtests/net/packetdrill/run_packet.c +++ b/gtests/net/packetdrill/run_packet.c @@ -1022,7 +1022,7 @@ static int map_outbound_live_sctp_packet( case SCTP_SSN_TSN_RESET_REQUEST_PARAMETER_TYPE: { struct sctp_ssn_tsn_reset_request_parameter *reset; reset = (struct sctp_ssn_tsn_reset_request_parameter *)parameter; - reset->reqsn = htonl(ntohl(reset->reqsn) + local_diff); + reset->reqsn = htonl(ntohl(reset->reqsn) + local_diff); break; } case SCTP_RECONFIG_RESPONSE_PARAMETER_TYPE: { diff --git a/gtests/net/packetdrill/sctp.h b/gtests/net/packetdrill/sctp.h index e388ebb260cad657ed1beafd4d131427d84ac55c..badde3425886c0ce13f01fa1d9bbf36e84d542ea 100644 --- a/gtests/net/packetdrill/sctp.h +++ b/gtests/net/packetdrill/sctp.h @@ -55,6 +55,7 @@ struct sctp_common_header { #define SCTP_I_DATA_CHUNK_TYPE 0x40 #define SCTP_RECONFIG_CHUNK_TYPE 0x82 #define SCTP_PAD_CHUNK_TYPE 0x84 + #define MAX_SCTP_CHUNK_BYTES 0xffff struct sctp_chunk { @@ -259,6 +260,7 @@ struct sctp_reconfig_chunk { #define SCTP_PAD_PARAMETER_TYPE 0x8005 #define SCTP_Set_Primary_Address 0xc004 #define SCTP_ADAPTATION_INDICATION_PARAMETER_TYPE 0xc006 + #define MAX_SCTP_PARAMETER_BYTES 0xffff struct sctp_parameter { @@ -483,4 +485,5 @@ struct sctp_protocol_violation_cause { __be16 length; __u8 information[]; } __packed; + #endif /* __SCTP_HEADERS_H__ */ diff --git a/gtests/net/packetdrill/sctp_chunk_to_string.c b/gtests/net/packetdrill/sctp_chunk_to_string.c index 729d6297bce2aaff9a5cbd9447098413a339ebad..007581c42bcf91b89313fd72a3388f9ec8e6b7a8 100644 --- a/gtests/net/packetdrill/sctp_chunk_to_string.c +++ b/gtests/net/packetdrill/sctp_chunk_to_string.c @@ -342,7 +342,7 @@ static int sctp_outgoing_ssn_reset_request_parameter_to_string( sid = ntohs(parameter->sids[len]); if (len > 0) fprintf(s, ", "); - fprintf(s, "%hu", sid); + fprintf(s, "%hu", sid); } fputs("]", s); return STATUS_OK; @@ -368,7 +368,7 @@ static int sctp_incoming_ssn_reset_request_parameter_to_string( sid = ntohs(parameter->sids[len]); if (len > 0) fprintf(s, ", "); - fprintf(s, "%hu", sid); + fprintf(s, "%hu", sid); } fputs("]", s); return STATUS_OK; diff --git a/gtests/net/packetdrill/sctp_packet.c b/gtests/net/packetdrill/sctp_packet.c index 1e60c0716baf927dec1ce405658ae8b5a21684c2..0af76df26ea512dbb0b5e56413b3eea10571b975 100644 --- a/gtests/net/packetdrill/sctp_packet.c +++ b/gtests/net/packetdrill/sctp_packet.c @@ -1821,7 +1821,7 @@ sctp_outgoing_ssn_reset_request_parameter_new(s64 reqsn, s64 respsn, s64 last_ts } if (respsn == -1) { flags |= FLAG_RECONFIG_RESP_SN_NOCHECK; - parameter->respsn = 0; + parameter->respsn = 0; } else { parameter->respsn = htonl((u32)respsn); }