}
/* next hop check. */
- if (bgp_update_martian_nexthop(bgp, afi, safi, &new_attr)) {
+ if (!CHECK_FLAG(peer->flags, PEER_FLAG_IS_RFAPI_HD) && /* allow vpn->vrf import */
+ bgp_update_martian_nexthop(bgp, afi, safi, &new_attr)) {
reason = "martian or self next-hop;";
bgp_attr_flush(&new_attr);
goto filtered;
connected = 0;
if (bgp_find_or_add_nexthop(bgp, afi, ri, NULL,
- connected))
+ connected) ||
+ CHECK_FLAG(peer->flags, PEER_FLAG_IS_RFAPI_HD))
bgp_info_set_flag(rn, ri, BGP_INFO_VALID);
else {
if (BGP_DEBUG(nht, NHT)) {
else
connected = 0;
- if (bgp_find_or_add_nexthop(bgp, afi, new, NULL, connected))
+ if (bgp_find_or_add_nexthop(bgp, afi, new, NULL, connected) ||
+ CHECK_FLAG(peer->flags, PEER_FLAG_IS_RFAPI_HD))
bgp_info_set_flag(rn, new, BGP_INFO_VALID);
else {
if (BGP_DEBUG(nht, NHT)) {
#define PEER_FLAG_DYNAMIC_NEIGHBOR (1 << 12) /* dynamic neighbor */
#define PEER_FLAG_CAPABILITY_ENHE (1 << 13) /* Extended next-hop (rfc 5549)*/
#define PEER_FLAG_IFPEER_V6ONLY (1 << 14) /* if-based peer is v6 only */
-#if ENABLE_BGP_VNC
#define PEER_FLAG_IS_RFAPI_HD (1 << 15) /* attached to rfapi HD */
-#endif
+
/* outgoing message sent in CEASE_ADMIN_SHUTDOWN notify */
char *tx_shutdown_message;