dhcp-to-dns: normalize A and CNAME record names to lowercase

This commit is contained in:
Łukasz Witkowski 2026-05-05 21:27:45 +02:00
parent b6e933406a
commit e7f23d6a32

View file

@ -71,9 +71,9 @@
:if ([ :len ($LeaseVal->"active-address") ] > 0) do={ :if ([ :len ($LeaseVal->"active-address") ] > 0) do={
:local Comment ($CommentPrefix . ", macaddress=" . $LeaseVal->"active-mac-address" . ", server=" . $LeaseVal->"server"); :local Comment ($CommentPrefix . ", macaddress=" . $LeaseVal->"active-mac-address" . ", server=" . $LeaseVal->"server");
:local MacDash [ $CleanName ($LeaseVal->"active-mac-address") ]; :local MacDash [ :tolower [ $CleanName ($LeaseVal->"active-mac-address") ] ];
:local LeaseInfo [ $ParseKeyValueStore ($LeaseVal->"comment") ]; :local LeaseInfo [ $ParseKeyValueStore ($LeaseVal->"comment") ];
:local HostName [ $CleanName [ $EitherOr ($LeaseInfo->"hostname") ($LeaseVal->"host-name") ] ]; :local HostName [ :tolower [ $CleanName [ $EitherOr ($LeaseInfo->"hostname") ($LeaseVal->"host-name") ] ] ];
:local Network [ /ip/dhcp-server/network/find where ($LeaseVal->"active-address") in address ]; :local Network [ /ip/dhcp-server/network/find where ($LeaseVal->"active-address") in address ];
:local NetworkVal; :local NetworkVal;
:if ([ :len $Network ] > 0) do={ :if ([ :len $Network ] > 0) do={