mirror of
https://github.com/nymurbd/MikroTik-scripts.git
synced 2025-08-04 02:04:39 +02:00
ipv6-update: automatically add ipv6 address list entry
This commit is contained in:
parent
e9210acfdb
commit
744a03896c
2 changed files with 8 additions and 0 deletions
|
@ -17,6 +17,11 @@
|
|||
|
||||
:local Pool [ / ipv6 pool get [ find where prefix=$PdPrefix ] name ];
|
||||
:local AddrList [ / ipv6 firewall address-list find where comment=("ipv6-pool-" . $Pool) ];
|
||||
:if ([ :len $AddrList ] = 0) do={
|
||||
:log info ("Missing ipv6 address list entry for ipv6-pool-" . $Pool . ", adding.");
|
||||
/ ipv6 firewall address-list add list=("ipv6-pool-" . $Pool) address=:: comment=("ipv6-pool-" . $Pool);
|
||||
:set AddrList [ / ipv6 firewall address-list find where comment=("ipv6-pool-" . $Pool) ];
|
||||
}
|
||||
:local OldPrefix [ / ipv6 firewall address-list get $AddrList address ];
|
||||
|
||||
# give the interfaces a moment to receive their addresses
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue