From 23b38fa15ab7c0b39dfeabbf2f45c69f94115ec6 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 5 Sep 2019 09:14:41 +0200 Subject: dhcp-to-dns: find duplicate leases by mac-address --- dhcp-to-dns | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dhcp-to-dns') diff --git a/dhcp-to-dns b/dhcp-to-dns index cd3b793..7cd7fa0 100644 --- a/dhcp-to-dns +++ b/dhcp-to-dns @@ -44,7 +44,7 @@ :if ([ :len $DnsRecord ] > 0) do={ :local DnsIp [ / ip dns static get $DnsRecord address ]; - :local HostLeases [ / ip dhcp-server lease find where host-name=($LeaseVal->"host-name") dynamic=yes ]; + :local HostLeases [ / ip dhcp-server lease find where mac-address=($LeaseVal->"mac-address") dynamic=yes ]; :if ([ :len $HostLeases ] > 1) do={ :set ($LeaseVal->"address") [ / ip dhcp-server lease get ($HostLeases->([ :len $HostLeases ] - 1)) address ]; } -- cgit v1.2.3-70-g09d2