mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2025-08-03 01:35:03 +02: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…
Add table
Add a link
Reference in a new issue