Skip to content

Commit

Permalink
fix wrong DACK8 values when using absolute numbers in the script
Browse files Browse the repository at this point in the history
DACK8 are 64-bit wide, so htonl() generates wrong value: use htonll().

Signed-off-by: Davide Caratti <dcaratti@redhat.com>
  • Loading branch information
dcaratti committed Feb 13, 2020
1 parent c5fd1f0 commit b3ef5ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gtests/net/packetdrill/mptcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1240,7 +1240,7 @@ int dss_inbound_parser(struct packet *packet_to_modify,
}else{
if (dack_script->dack8 > 0)
dack_live->dack8 =
htonl(sha_least_64bits(mp_state.kernel_key,
htonll(sha_least_64bits(mp_state.kernel_key,
mp_state.hash) +
dack_script->dack8);
}
Expand All @@ -1259,7 +1259,7 @@ int dss_inbound_parser(struct packet *packet_to_modify,
}else{
if (dsn_script->dsn8 > 0)
dsn_live->dsn8 =
htonl(sha_least_64bits(mp_state.packetdrill_key,
htonll(sha_least_64bits(mp_state.packetdrill_key,
mp_state.hash) +
dsn_script->dsn8);
}
Expand Down

0 comments on commit b3ef5ef

Please sign in to comment.