diff --git a/gtests/net/packetdrill/sctp_packet.c b/gtests/net/packetdrill/sctp_packet.c index 2ac760550056551d62cd27793259590b1a9890b1..007668111d0dae8cfb2c4cdaa998572ee1d56c65 100644 --- a/gtests/net/packetdrill/sctp_packet.c +++ b/gtests/net/packetdrill/sctp_packet.c @@ -1154,17 +1154,18 @@ sctp_i_data_chunk_new(s64 flgs, s64 len, s64 tsn, s64 sid, s64 res, s64 mid, chunk->mid = htonl((u32)mid); } if (ppid == -1) { - chunk->field.ppid = htonl(0); flags |= FLAG_I_DATA_CHUNK_PPID_NOCHECK; } else { chunk->field.ppid = htonl((u32)ppid); } if (fsn == -1) { - chunk->field.fsn = htonl(0); flags |= FLAG_I_DATA_CHUNK_FSN_NOCHECK; } else { chunk->field.fsn = htonl((u32)fsn); } + if (ppid == -1 && fsn == -1) { + chunk->field.ppid = htonl(0); + } memset(chunk->data, 0, length + padding_length - sizeof(struct sctp_i_data_chunk)); return sctp_chunk_list_item_new((struct sctp_chunk *)chunk,