aboutsummaryrefslogtreecommitdiffstats
path: root/dhcp-to-dns.rsc
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2023-10-27 10:12:47 +0200
committerGravatar Christian Hesse <mail@eworm.de>2023-10-27 14:13:58 +0200
commit576364f44a99f35ca7055338a5f95228f46b0492 (patch)
tree5c977fbf135cd53a1029af18e54a80e76df27d84 /dhcp-to-dns.rsc
parentc34599fe46f91f83aac8bce78f3e250a0a46f60e (diff)
dhcp-to-dns: info on mac address bound multiple time
Diffstat (limited to 'dhcp-to-dns.rsc')
-rw-r--r--dhcp-to-dns.rsc3
1 files changed, 3 insertions, 0 deletions
diff --git a/dhcp-to-dns.rsc b/dhcp-to-dns.rsc
index 5bd4462..e363b85 100644
--- a/dhcp-to-dns.rsc
+++ b/dhcp-to-dns.rsc
@@ -54,6 +54,9 @@ $ScriptLock $0 false 10;
:local LeaseVal;
:do {
:set LeaseVal [ /ip/dhcp-server/lease/get $Lease ];
+ :if ([ :len [ /ip/dhcp-server/lease/find where active-mac-address=($LeaseVal->"active-mac-address") status=bound ] ] > 1) do={
+ $LogPrintOnce info $0 ("Multiple bound leases found for mac-address " . ($LeaseVal->"active-mac-address") . "!");
+ }
} on-error={
$LogPrintExit2 debug $0 ("A lease just vanished, ignoring.") false;
}