For instance, if we receive the routes from the peer with the next-hop as me,
but those routes shares the same network, we can fake the next-hop.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(type == ZEBRA_ROUTE_BGP && stype == BGP_ROUTE_STATIC) ? true
: false;
+ /* If `bgp allow-martian-nexthop` is turned on, return next-hop
+ * as good.
+ */
+ if (bgp->allow_martian)
+ return false;
+
/*
* Only validated for unicast and multicast currently.
* Also valid for EVPN where the nexthop is an IP address.