mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
dhcp-to-dns: fix static lease that lost bound status
This commit is contained in:
parent
23daea2354
commit
5f357fd242
1 changed files with 4 additions and 1 deletions
|
@ -76,7 +76,10 @@ $ScriptLock $0 false 10;
|
|||
}
|
||||
|
||||
:if ([ :len ($LeaseVal->"host-name") ] > 0) do={
|
||||
:set ($LeaseVal->"address") [ / ip dhcp-server lease get ([ find where host-name=($LeaseVal->"host-name") status=bound ]->0) address ];
|
||||
:local HostNameLeases [ / ip dhcp-server lease find where host-name=($LeaseVal->"host-name") status=bound ];
|
||||
:if ([ :len $HostNameLeases ] > 1) do={
|
||||
:set ($LeaseVal->"address") [ / ip dhcp-server lease get ($HostNameLeases->0) address ];
|
||||
}
|
||||
}
|
||||
|
||||
:if ($DnsIp = $LeaseVal->"address") do={
|
||||
|
|
Loading…
Reference in a new issue