diff --git a/components/route_hook/src/esp_route_table.c b/components/route_hook/src/esp_route_table.c index 48aaa4f33..0c3bea643 100644 --- a/components/route_hook/src/esp_route_table.c +++ b/components/route_hook/src/esp_route_table.c @@ -77,7 +77,9 @@ esp_route_entry_t *esp_route_table_add_route_entry(const esp_route_entry_t *rout } entry->preference = route_entry->preference; entry->lifetime_seconds = route_entry->lifetime_seconds; - sys_timeout(entry->lifetime_seconds * 1000, route_timeout_handler, entry); + if (entry->lifetime_seconds != UINT32_MAX) { + sys_timeout(entry->lifetime_seconds * 1000, route_timeout_handler, entry); + } return entry; }