aboutsummaryrefslogtreecommitdiffstats
path: root/ipv6-update.rsc
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2024-10-22 22:35:14 +0200
committerGravatar Christian Hesse <mail@eworm.de>2024-10-25 18:20:17 +0200
commite803f8b3c0956e8b9f3992433d0a3caf9cb4c899 (patch)
tree74d0d000d715074fe8ac95493e82ce443c60aa1b /ipv6-update.rsc
parentd022c876514107bd345a17a0c01896947a83b45f (diff)
ipv6-update: create a dynamic address-list entry only
This should make sure that the script runs once after reboot, even if the prefix does not change. An existing static entry needs to be removed to make this work! https://github.com/eworm-de/routeros-scripts/issues/85
Diffstat (limited to 'ipv6-update.rsc')
-rw-r--r--ipv6-update.rsc4
1 files changed, 2 insertions, 2 deletions
diff --git a/ipv6-update.rsc b/ipv6-update.rsc
index 47bf3de..ccc0eb9 100644
--- a/ipv6-update.rsc
+++ b/ipv6-update.rsc
@@ -37,8 +37,8 @@
:local Pool [ /ipv6/pool/get [ find where prefix=$PdPrefix ] name ];
:if ([ :len [ /ipv6/firewall/address-list/find where comment=("ipv6-pool-" . $Pool) ] ] = 0) do={
- /ipv6/firewall/address-list/add list=("ipv6-pool-" . $Pool) address=:: comment=("ipv6-pool-" . $Pool);
- $LogPrint warning $ScriptName ("Added ipv6 address list entry for ipv6-pool-" . $Pool);
+ /ipv6/firewall/address-list/add list=("ipv6-pool-" . $Pool) address=:: comment=("ipv6-pool-" . $Pool) dynamic=yes;
+ $LogPrint warning $ScriptName ("Added dynamic ipv6 address list entry for ipv6-pool-" . $Pool);
}
:local AddrList [ /ipv6/firewall/address-list/find where comment=("ipv6-pool-" . $Pool) ];
:local OldPrefix [ /ipv6/firewall/address-list/get ($AddrList->0) address ];