Skip to content

Commit

Permalink
fixup: htons probe->length
Browse files Browse the repository at this point in the history
  • Loading branch information
expressvpn-tom-l committed Oct 18, 2023
1 parent 6485252 commit f6a1266
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/he/pmtud.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ he_return_code_t he_internal_pmtud_send_probe(he_conn_t *conn, uint16_t probe_mt

// Set payload for the probe message
uint16_t payload_size = probe_mtu + sizeof(he_msg_data_t) - sizeof(he_msg_ping_t);
probe->length = payload_size;
probe->length = htons(payload_size);

conn->pmtud_probe_count++;
conn->pmtud_probing_size = probe_mtu;
Expand Down
1 change: 1 addition & 0 deletions test/he/test_pmtud.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ void test_he_internal_pmtud_send_probe(void) {
uint16_t expected_length = probe_mtu + sizeof(he_msg_data_t);
he_internal_send_message_ExpectAndReturn(&conn, NULL, expected_length, HE_SUCCESS);
he_internal_send_message_IgnoreArg_message();

he_return_code_t res = he_internal_pmtud_send_probe(&conn, probe_mtu);
TEST_ASSERT_EQUAL(HE_SUCCESS, res);
TEST_ASSERT_EQUAL(1, call_counter);
Expand Down

0 comments on commit f6a1266

Please sign in to comment.