]> git.proxmox.com Git - mirror_frr.git/commitdiff
bgpd: skip ra for blackhole nexthop type
authorChirag Shah <chirag@cumulusnetworks.com>
Tue, 3 Dec 2019 20:08:01 +0000 (12:08 -0800)
committerChirag Shah <chirag@cumulusnetworks.com>
Mon, 30 Dec 2019 06:16:51 +0000 (22:16 -0800)
bgp nexthop cache update triggers RA for global ipv6
nexthop update.
In case of blackhole route type the outgoing interface
information is NULL which leads to bgpd crash.

Skip sending RA for blackhole nexthop type.

Ticket:CM-27299
Reviewed By:
Testing Done:

Configure bgp neighbor over global ipv6 address.
Configure static blackhole route with prefix includes
connected ipv6 global address.
Upon link flap, zebra sends nexthop update to bgp.
Bgp nexthop cache skips sending RA for blackhole nexthop type.

router bgp 65002
 bgp router-id 91.189.93.190
 ...
 neighbor 2001:67c:1360::b peer-group internal

static route:
ipv6 route 2001:67c:1360::/48 Null0 254

iface rowlink.4010
        address 91.189.93.190/32
        address 2001:67c:1360::a/128

Trigger ifdown rowlink.4010; ifup rowlink.4010

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
bgpd/bgp_nht.c

index 0969c8e77e38db684937669074e870d73f9afd18..a50fc7d69726c61ecd9d31c5ba27c448238bc31a 100644 (file)
@@ -421,7 +421,8 @@ void bgp_parse_nexthop_update(int command, vrf_id_t vrf_id)
                        if (peer && !peer->ifp
                            && CHECK_FLAG(peer->flags,
                                          PEER_FLAG_CAPABILITY_ENHE)
-                           && nhr.prefix.family == AF_INET6) {
+                           && nhr.prefix.family == AF_INET6
+                           && nexthop->type != NEXTHOP_TYPE_BLACKHOLE) {
                                struct interface *ifp;
 
                                ifp = if_lookup_by_index(nexthop->ifindex,