]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: Fix the bug that BGP MRAI does not work.
authorRichard Wu <wutong23@baidu.com>
Fri, 5 Jun 2020 09:54:57 +0000 (17:54 +0800)
committerDonatas Abraitis <donatas.abraitis@gmail.com>
Sat, 18 Jul 2020 18:44:49 +0000 (21:44 +0300)
Issue: bgp_process_writes will be called when the fd is writable.
       And it will bgp_generate_updgrp_packets to generate the
       update packets no matter MRAI is set or not.
Fix:   bgp_generate_updgrp_packets thread will return without sending
       any update when MRAI timer is still running.

Signed-off-by: Richard Wu <wutong23@baidu.com>
bgpd/bgp_packet.c

index 29c03f4014cebb52bde4e4128164a9940482e56b..6f1c033f2a72a8640fcf5202504446bcbbc1f0c3 100644 (file)
@@ -408,6 +408,9 @@ int bgp_generate_updgrp_packets(struct thread *thread)
        if (peer->bgp->main_peers_update_hold)
                return 0;
 
+       if (peer->t_routeadv)
+               return 0;
+
        do {
                s = NULL;
                FOREACH_AFI_SAFI (afi, safi) {