1
0
mirror of https://github.com/eworm-de/routeros-scripts.git synced 2024-05-11 05:55:19 +00:00

ipv6-update: apply a mask on prefix

Fixes #11
This commit is contained in:
Christian Hesse
2021-05-24 21:32:56 +02:00
parent 330bc7fc8b
commit e74b2e03a2

View File

@@ -51,7 +51,7 @@
:local Comment [ $ParseKeyValueStore ($RecordVal->"comment") ];
:local Prefix [ / ipv6 address get [ find where interface=($Comment->"interface") from-pool=$Pool global ] address ];
:set Prefix [ :toip6 [ :pick $Prefix 0 [ :find $Prefix "/64" ] ] ];
:set Prefix ([ :toip6 [ :pick $Prefix 0 [ :find $Prefix "/64" ] ] ] & ffff:ffff:ffff:ffff::);
:local Address ($Prefix | ([ :toip6 ($RecordVal->"address") ] & ::ffff:ffff:ffff:ffff));
:log info ("Updating DNS record for " . ($RecordVal->"name") . ($RecordVal->"regexp") . " to " . $Address);