From 4e665f6a3c31a92e0450e6e3a178d6c8ccd1b3cd Mon Sep 17 00:00:00 2001 From: Vincent Li Date: Wed, 25 Jun 2025 19:15:47 +0000 Subject: [PATCH] dnsdist: correct xsk sample config when use /etc/rc.d/init.d/dnsdist to start dnsdist with the sample xsk config, it results in startup error [0]. Correct the xsk sample config. [0]: https://github.com/PowerDNS/pdns/discussions/15713 Signed-off-by: Vincent Li --- config/dnsdist/dnsdist-xsk.conf | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/config/dnsdist/dnsdist-xsk.conf b/config/dnsdist/dnsdist-xsk.conf index 8964bd97b..5409c0584 100644 --- a/config/dnsdist/dnsdist-xsk.conf +++ b/config/dnsdist/dnsdist-xsk.conf @@ -1,6 +1,9 @@ -xsk = newXsk({ifName="green0", NIC_queue_id=0, frameNums=65536, xskMapPath="/sys/fs/bpf/dnsdist/xsk_map"}) - -addLocal("0.0.0.0:53", {xskSocket=xsk}) +if not inConfigCheck() then + xsk = newXsk({ifName='green0', NIC_queue_id=0, frameNums=65536, xskMapPath='/sys/fs/bpf/dnsdist/xsk_map'}) + addLocal("0.0.0.0:53", {xskSocket=xsk}) +else + addLocal("0.0.0.0:53") +end newServer("8.8.8.8:53") newServer("1.1.1.1:53")