Hello
I'm having difficulty using as-path math expressions

Look at my case.
correct as-path: 65001 65002 65003

I would like to validate if the as-path of the received prefix conforms to the as-path above. But, I would like to allow prepend of all ASes, so:
65001 65001 65002 65003 is valid
65001 65002 65002 65003 is valid
65001 65002 65003 65003 is valid
65001 65001 65002 65002 65002 65003 65003 is valid
65001 65999 65002 65003 is NOT valid

The best expression I found was
if (bgp_path ~ [= 65001* 65002* 65003* =]) then

but it considers the path '65001 65999 65002 65003' to be valid

With regex that would be easier, but with bird bgpmask I couldn't solve it.

Any suggestion?


--
Marcelo Balbinot
IP/MPLS Backbone Manager at AS53062
G G NET Telecomunicações
www.gegnet.com.br
INOC 53062*100

Reply via email to