Skip to content

Commit

Permalink
fix inbound HMAC for ADD_ADDR with port
Browse files Browse the repository at this point in the history
port was still hardcoded to 0

Fixes: 58039d6 ("packetdrill: fix a couple of errors when parsing ADD_ADDR with ports")
  • Loading branch information
dcaratti committed Mar 19, 2021
1 parent 2688271 commit 93520fc
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 @@ -1991,7 +1991,7 @@ int mptcp_subtype_add_address(struct packet *packet_to_modify,
mp_state.kernel_key,
add_addr_script->data.add_addr.address_id,
&add_addr_script->data.add_addr.ipv4_w_port_hmac.ipv4,
0);
ntohs(add_addr_script->data.add_addr.ipv4_w_port_hmac.port));
}else if(add_addr_live->length == TCPOLEN_ADD_ADDR_V6){
add_addr_live->data.add_addr.ipv6 = endpoint->ip.ip.v6;
}else if(add_addr_live->length == TCPOLEN_ADD_ADDR_V6_PORT){
Expand All @@ -2017,7 +2017,7 @@ int mptcp_subtype_add_address(struct packet *packet_to_modify,
mp_state.kernel_key,
add_addr_script->data.add_addr.address_id,
&add_addr_script->data.add_addr.ipv6_w_port_hmac.ipv6,
0);
ntohs(add_addr_script->data.add_addr.ipv6_w_port_hmac.port));
}else
return STATUS_ERR;
}else if(direction == DIRECTION_OUTBOUND){
Expand Down

0 comments on commit 93520fc

Please sign in to comment.