dhcp-to-dns: allow to ignore for specific lease

This commit is contained in:
Christian Hesse 2026-05-12 07:11:14 +02:00
parent 69a45a51d3
commit 99facacb59
2 changed files with 4 additions and 2 deletions

View file

@ -80,8 +80,8 @@
}
:local NetworkInfo [ $ParseKeyValueStore ($NetworkVal->"comment") ];
:if ($NetworkInfo->"dns-ignore" = true) do={
$LogPrint debug $ScriptName ("Lease for " . $LeaseVal->"active-mac-address" . " is in ignored network... Skipping.");
:if ($LeaseInfo->"dns-ignore" = true || $NetworkInfo->"dns-ignore" = true) do={
$LogPrint debug $ScriptName ("Lease for " . $LeaseVal->"active-mac-address" . " is ignored... Skipping.");
:continue;
}

View file

@ -55,6 +55,8 @@ for specific networks:
/ip/dhcp-server/network/add address=10.0.0.0/24 domain=example.com comment="dns-ignore=true";
The same can be done for a specific lease with its comment.
Use this to add an extra level in dns name or define a different domain.
/ip/dhcp-server/network/add address=10.0.0.0/24 domain=example.com comment="domain=another-domain.com, name-extra=dhcp";