Skip to content

Commit

Permalink
fix variable assignment in case of v1 3WHS
Browse files Browse the repository at this point in the history
when testing MPTCP v1 clients, the kernel key needs to be set while
parsing the third ack in the 3WHS.

Signed-off-by: Davide Caratti <[email protected]>
  • Loading branch information
dcaratti committed Jan 9, 2020
1 parent f25a590 commit 7b892aa
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions gtests/net/packetdrill/mptcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,13 @@ int mptcp_subtype_mp_capable(struct packet *packet_to_modify,
}
// Third (ack) packet in three-hand shake
else if (optlen == TCPOLEN_MP_CAPABLE) {
/* with protocol v1, the client key is transmitted in
* the last packet of the three-way-handshake
*/
if (direction == DIRECTION_OUTBOUND &&
tcp_opt_to_modify->data.mp_capable.version != 0)
error = extract_and_set_kernel_key(live_packet);

error = mptcp_set_mp_cap_keys(tcp_opt_to_modify);
// Automatically put the idsn tokens
/*** XXX TODO USE SHA256 when version is 1 ****/
Expand Down

0 comments on commit 7b892aa

Please sign in to comment.