Skip to content

Commit

Permalink
Merge pull request google#48 from dcaratti/fix-add-addr-port
Browse files Browse the repository at this point in the history
fix inbound HMAC for ADD_ADDR with port
  • Loading branch information
dcaratti authored Mar 19, 2021
2 parents c6f912c + 93520fc commit 8024fdb
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 8024fdb

Please sign in to comment.