From 3f468c9ed2c5a981bafa87a0b3f49aee9379e253 Mon Sep 17 00:00:00 2001 From: tievolu <78606440+tievolu@users.noreply.github.com> Date: Fri, 30 Sep 2022 18:00:23 +0100 Subject: [PATCH] Set ICMP idle interval when connection goes down --- sqm-autorate.pl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sqm-autorate.pl b/sqm-autorate.pl index 8f59d71..ef9bdc8 100644 --- a/sqm-autorate.pl +++ b/sqm-autorate.pl @@ -2637,9 +2637,15 @@ sub handle_connection_down { if ($log_bw_changes) { &print_latency_results_summary(@{$summary_results_array_ref}); } # Send high priority alert to the syslog - &output(1, "Internet connection appears to be down. Taking no action.", 1); + &output(1, "Internet connection appears to be down.", 1); &set_connection_down(); + # Set ICMP interval to idle + if ($icmp_interval_idle > 0 && $icmp_interval != $icmp_interval_idle) { + if ($debug_icmp_adaptive) { &output(0, "ICMP ADAPTIVE DEBUG: Setting ICMP interval to $icmp_interval_idle" . "s"); } + $icmp_interval != $icmp_interval_idle; + } + # Indicate that connection state has changed return 1; } else {