You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
986 B

  1. From 2bbe7133eb5cb97ba4b745cd251a8615cd2bd008 Mon Sep 17 00:00:00 2001
  2. From: Richard Wu <wutong23@baidu.com>
  3. Date: Fri, 5 Jun 2020 17:54:57 +0800
  4. Subject: [PATCH] bgpd: Fix the bug that BGP MRAI does not work.
  5. Issue: bgp_process_writes will be called when the fd is writable.
  6. And it will bgp_generate_updgrp_packets to generate the
  7. update packets no matter MRAI is set or not.
  8. Fix: bgp_generate_updgrp_packets thread will return without sending
  9. any update when MRAI timer is still running.
  10. Signed-off-by: Richard Wu <wutong23@baidu.com>
  11. ---
  12. bgpd/bgp_packet.c | 3 +++
  13. 1 file changed, 3 insertions(+)
  14. diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c
  15. index 29c03f4014..6f1c033f2a 100644
  16. --- a/bgpd/bgp_packet.c
  17. +++ b/bgpd/bgp_packet.c
  18. @@ -408,6 +408,9 @@ int bgp_generate_updgrp_packets(struct thread *thread)
  19. if (peer->bgp->main_peers_update_hold)
  20. return 0;
  21. + if (peer->t_routeadv)
  22. + return 0;
  23. +
  24. do {
  25. s = NULL;
  26. FOREACH_AFI_SAFI (afi, safi) {