BGP installing route in RIB even though IPv6 next-hop is not reachable.
Steps to reproduce:
Debug issue below check is return -1.
1.From Cisco advertise ipv6 network route (say 4444::/64) to R2
2.On R2 we are getting EBGP route and instaled in RIB. 3.Do not configure next-hop self on R2. 4.DUT learns routes advertized by Cisco. Installs in the RIB without nexthop reachabilty check.
make_prefix (int afi, struct bgp_info ri, struct prefix *p)
/ We don't register link local NH */
if (ri->attr->extra->mp_nexthop_len != 16
|| IN6_IS_ADDR_LINKLOCAL (&ri->attr->extra->mp_nexthop_global))
Here my debug shows attr->extra->mp_nexthop_len is 32 not 16.
So nexthopt reacabilty return suscess without quering RIB.
Another Observation from From RFC#2545.
The link-local address shall be included in the Next Hop field if and
only if the BGP speaker shares a common subnet with the entity
identified by the global IPv6 address carried in the Network Address
of Next Hop field and the peer the route is being advertised to.
The above rule is not respected by quagga and Cisco also. So route is sent to peer with next-hop with global and link-local address making value of the Length of Next Hop Network Address field on a MP_REACH_NLRI attribute set to 32.
Can anyone suggest how to fix this or how to work around it via configuration settings?
Thanks in advance.