diff options
author | Russ White <russ@riw.us> | 2018-09-24 15:55:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-24 15:55:50 +0200 |
commit | 82977e243acdcded87aa54e6613460cdf948415d (patch) | |
tree | a0e20186b2157e11358caa23cd78b536a2603384 /bgpd/bgp_nht.c | |
parent | Merge pull request #2992 from opensourcerouting/large_as_path_fix (diff) | |
parent | zebra: Use actual memory type for zebra info pointer (diff) | |
download | frr-82977e243acdcded87aa54e6613460cdf948415d.tar.xz frr-82977e243acdcded87aa54e6613460cdf948415d.zip |
Merge pull request #3020 from donaldsharp/global_5549
Allow v6 global addresses to be nexthops for v4 addresses in bgp
Diffstat (limited to 'bgpd/bgp_nht.c')
-rw-r--r-- | bgpd/bgp_nht.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/bgpd/bgp_nht.c b/bgpd/bgp_nht.c index 7eba0eda4..dd1ffe9f3 100644 --- a/bgpd/bgp_nht.c +++ b/bgpd/bgp_nht.c @@ -415,6 +415,8 @@ void bgp_parse_nexthop_update(int command, vrf_id_t vrf_id) bnc->change_flags |= BGP_NEXTHOP_CHANGED; if (nhr.nexthop_num) { + struct peer *peer = bnc->nht_info; + /* notify bgp fsm if nbr ip goes from invalid->valid */ if (!bnc->nexthop_num) UNSET_FLAG(bnc->flags, BGP_NEXTHOP_PEER_NOTIFIED); @@ -430,6 +432,22 @@ void bgp_parse_nexthop_update(int command, vrf_id_t vrf_id) nexthop = nexthop_from_zapi_nexthop(&nhr.nexthops[i]); + /* + * Turn on RA for the v6 nexthops + * we receive from bgp. This is to allow us + * to work with v4 routing over v6 nexthops + */ + if (peer && + CHECK_FLAG(peer->flags, PEER_FLAG_CAPABILITY_ENHE) + && nhr.prefix.family == AF_INET6) { + struct interface *ifp; + + ifp = if_lookup_by_index(nexthop->ifindex, + nexthop->vrf_id); + zclient_send_interface_radv_req( + zclient, nexthop->vrf_id, ifp, true, + BGP_UNNUM_DEFAULT_RA_INTERVAL); + } /* There is at least one label-switched path */ if (nexthop->nh_label && nexthop->nh_label->num_labels) { |