aboutsummaryrefslogtreecommitdiffstats
path: root/dhcp-to-dns
diff options
context:
space:
mode:
Diffstat (limited to 'dhcp-to-dns')
-rw-r--r--dhcp-to-dns5
1 files changed, 1 insertions, 4 deletions
diff --git a/dhcp-to-dns b/dhcp-to-dns
index e403881..81b2964 100644
--- a/dhcp-to-dns
+++ b/dhcp-to-dns
@@ -49,10 +49,7 @@
:set ($LeaseVal->"address") [ / ip dhcp-server lease get ($DupMacLeases->([ :len $DupMacLeases ] - 1)) address ];
}
- :local DupHostLeases [ / ip dhcp-server lease find where host-name=($LeaseVal->"host-name") dynamic=yes ];
- :if ([ :len $DupHostLeases ] > 1) do={
- :set ($LeaseVal->"address") [ / ip dhcp-server lease get ($DupHostLeases->0) address ];
- }
+ :set ($LeaseVal->"address") [ / ip dhcp-server lease get ([ find where host-name=($LeaseVal->"host-name") dynamic=yes ]->0) address ];
:if ($DnsIp = $LeaseVal->"address") do={
:log debug ("DNS entry for " . $Fqdn . " does not need updating.");