Filter to fix gateway problems with BPG + link local + BIRD

I got two BGP peers, using only link local. Before I tested the setup, and it worked perfectly. Of course, this means it broke when put in production.

The two attached files show the problem: BIRD sends TWO addresses on the “Next Hop” field. The link local address IP and one “::” (since this P2P link only uses link local). ROS sends ONLY the link local IP.

And RoS is choking on this, thinking that the route doesn’t have a gateway. I solved this with a one liner filter, but it is different for every peer. I would like some help to create something that I could just use to everyone.

Now, my filter:

if (protocol bgp && afi ipv6) {set gw fe80::2923%banduraDE; jump DN42PeerEuropa}

It works, but as You can see, I have to use one for each peer, since the gateway address and the interface aren’t variables.
By Mikrotik docs, I can read the “bgp-input-remote-addr” and the “gw-interface”. But I can’t find a way to put the variables as values.

I tried this, but the sintax parser chockes on “bgp-input-remote-addr”

 if (protocol bgp && afi ipv6) {set gw bgp-input-remote-addr%gw-interface; jump DN42PeerEuropa}

Any ideas?
bird_and_mikrotik.png
between_mikrotiks.png

The two attached files show the problem: BIRD sends TWO addresses on the “Next Hop” field. The link local address IP and one “::” (since this P2P link only uses link local). ROS sends ONLY the link local IP.

And RoS is choking on this, thinking that the route doesn’t have a gateway. I solved this with a one liner filter, but it is different for every peer. I would like some help to create something that I could just use to everyone.

can you give us some output example on mt sides?

It’s the second image, the one named “One Mikrotik to another”. The first message shows a Mikrotik talking to a Bird. The difference is in the “Next Hop” line.
Or I didn’t understand the question?

hi,

[]
It’s the second image, the one named “One Mikrotik to another”.
[
]

yes. that’s what i have thought.
from those 2 images - are you sure you are not twisted? i think that bird didn’t send mt its (bird) ipv6 nexthop.

my guess is mt’s routing table is correct in this particular issue.

– EDIT –
Clarifying what Bird does.

Bird sent “Next Hop: IPv6=:: Link-Local=fe80::2923”

RoS chocked on that first “::”. Funny thing is: RoS is in the right here: the drafts say to do what it does, and Bird do this weird thing for some time - I found some frr bug report with the SAME issue (https://github.com/FRRouting/frr/issues/6259)

But that’s not the point. I want to make a rule that allow me to use with all my peers. As things stand, my filter rule work - but I have to make one for each peer.