BGP Filters - howto?

Dealing with BGP on Mikrotik, and just to check if I’m right with syntax:

  • how to permit all paths that are not longer that (say) 5 hops?
  • how to permit to get all routes that are leading to (say) 8.8.8.8?

And another question, if there any way I can do BGP Conditional Advertisement (like in Cisco https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/16137-cond-adv.html)?

Thank you in advance!

This Wiki will tell you how the filters work.

BGP routes do not carry ‘hops’, but using bgp-as-path-length you can calculate the how many AS’s in the routes path and filter based on that.

I read that, the problem is, I’m not sure how filters work exactly in MT verson. Regexps as an example. Wiki’s exmples are pretty simple.