Skip to content

Commit

Permalink
fixup: always stop current pmtud timer when ack received
Browse files Browse the repository at this point in the history
  • Loading branch information
expressvpn-tom-l committed Oct 18, 2023
1 parent 68e2738 commit 331dc8e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/he/pmtud.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ he_return_code_t he_internal_pmtud_handle_probe_ack(he_conn_t *conn, uint16_t pr
return HE_SUCCESS;
}

// Stop the timer
if(conn->pmtud_time_cb) {
conn->pmtud_time_cb(conn, 0, conn->data);
}

// Reset the pending probe id
conn->pmtud_probe_pending_id = 0;

Expand Down
4 changes: 3 additions & 1 deletion test/support/test_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ he_return_code_t pop_network_config_cb(he_conn_t *conn, he_network_config_ipv4_t
}

he_return_code_t pmtud_time_cb(he_conn_t *conn, int timeout, void *context) {
call_counter++;
if(timeout > 0) {
call_counter++;
}
return HE_SUCCESS;
}

Expand Down

0 comments on commit 331dc8e

Please sign in to comment.