Hi,
I presume the following will need to turn in to a support request but I’m hoping someone has a work around. We walk the routing table looking for prefixes that match certain community strings and then add them to an array, to later add them to firewall address lists.
:foreach i in=[ /ip route find where active and bgp-communities ~ $community ] do={
:set destination [ /ip route get $i dst-address ];
:set prefixes [ $arrayXpush $prefixes $destination ];
}
Reference: http://forum.mikrotik.com/t/automating-address-list-maintenance-manrs-compliance/115375/1
The problem is that this can take almost 15 minutes. If we have any prefix churn during this time the loop starts returning inconsistent prefixes which don’t match the search criteria. I presume one work around would be to again validate that the prefixes contain the community value but I would expect the array to remain consistent.
Regards
David Herselman