diff --git a/src/he/pmtud.c b/src/he/pmtud.c index f22e8585..74f0859f 100644 --- a/src/he/pmtud.c +++ b/src/he/pmtud.c @@ -164,6 +164,7 @@ he_return_code_t he_internal_pmtud_handle_probe_timeout(he_conn_t *conn) { case HE_PMTUD_STATE_BASE: if(conn->pmtud.probing_size == INITIAL_PLPMTU) { // Try again using MIN_PLPMTU + conn->pmtud.base = MIN_PLPMTU; return he_internal_pmtud_send_probe(conn, MIN_PLPMTU); } else { // Unable to confirm the base PMTU, entering error state. diff --git a/test/he/test_pmtud.c b/test/he/test_pmtud.c index 79bc0f07..64a34f4c 100644 --- a/test/he/test_pmtud.c +++ b/test/he/test_pmtud.c @@ -273,6 +273,7 @@ void test_he_internal_pmtud_handle_probe_timeout_confirm_base_retry_with_min_plp conn.pmtud.state = HE_PMTUD_STATE_BASE; conn.pmtud.probe_count = MAX_PROBES; conn.pmtud_time_cb = pmtud_time_cb; + conn.pmtud.base = INITIAL_PLPMTU; conn.pmtud.probing_size = INITIAL_PLPMTU; conn.ping_next_id = 42; @@ -289,8 +290,11 @@ void test_he_internal_pmtud_handle_probe_timeout_confirm_base_retry_with_min_plp TEST_ASSERT_EQUAL(1, conn.pmtud.probe_count); TEST_ASSERT_EQUAL(42, conn.pmtud.probe_pending_id); - // The new probe size should be MIN_PLPMTU + // The new probe size and base should be MIN_PLPMTU TEST_ASSERT_EQUAL(MIN_PLPMTU, conn.pmtud.probing_size); + // If MIN_PLPMTU probe succeeded, pmtud.base will be used as part of the next probe size + // calculation + TEST_ASSERT_EQUAL(MIN_PLPMTU, conn.pmtud.base); // pmtud_time_cb should be called to retry the error TEST_ASSERT_EQUAL(1, call_counter);