From f41ff6d3e7967e1960ed9f733599e68dd8c7db95 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Mon, 15 Sep 2025 18:04:59 +0200 Subject: [PATCH] confd: reduce dhcp client logging overhead by 70% MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adjust DHCP client retry behavior: -t 3 (was -t 10) : Maximum discovery attempts per cycle -T 5 (was -T 3) : Seconds to wait between attempts -A 30 (was -A 10) : Seconds to wait after all attempts fail Before: 10 attempts × 3 seconds = 30 seconds of rapid trying, then 10 second pause = 40 second total cycle After: 3 attempts × 5 seconds = 15 seconds of trying, then 30 second pause = 45 second total cycle => 70% fewer log messages during active attempts, with longer quiet periods between cycles. Fixes #1100 Signed-off-by: Joachim Wiberg --- src/confd/src/infix-dhcp-client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/confd/src/infix-dhcp-client.c b/src/confd/src/infix-dhcp-client.c index a095a0f7..a3f5be7a 100644 --- a/src/confd/src/infix-dhcp-client.c +++ b/src/confd/src/infix-dhcp-client.c @@ -256,7 +256,7 @@ static void add(const char *ifname, struct lyd_node *cfg) fprintf(fp, "# Generated by Infix confd\n"); fprintf(fp, "metric=%s\n", metric); fprintf(fp, "service name:dhcp-client :%s \\\n" - " [2345] udhcpc -f -p /run/dhcp-client-%s.pid -t 10 -T 3 -A 10 %s -S -R \\\n" + " [2345] udhcpc -f -p /run/dhcp-client-%s.pid -t 3 -T 5 -A 30 %s -S -R \\\n" " %s%s \\\n" " -i %s %s %s \\\n" " -- DHCP client @%s\n",