From 9e3b51a7f3d111e6c01424dae801501f7053bc60 Mon Sep 17 00:00:00 2001 From: bisdhdh Date: Thu, 24 Oct 2019 20:29:43 +0530 Subject: bgpd: Restarting node does not send EOR after the convergence. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit *After a restarting router comes up and the bgp session is successfully established with the peer. If the restarting router doesn’t have any route to send, it send EOR to the peer immediately before receiving updates from its peers. *Instead the restarting router should send EOR, if the selection deferral timer is not running OR count of eor received and eor required are matches then send EOR. Signed-off-by: Biswajit Sadhu --- bgpd/bgp_vty.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'bgpd/bgp_vty.h') diff --git a/bgpd/bgp_vty.h b/bgpd/bgp_vty.h index 3f60c7719c..3dc639ea76 100644 --- a/bgpd/bgp_vty.h +++ b/bgpd/bgp_vty.h @@ -68,6 +68,27 @@ struct bgp; vty, p, use_json, json); \ } while (0) + +#define PRINT_EOR(_eor_flag) \ + do { \ + if (eor_flag) \ + vty_out(vty, "Yes\n"); \ + else \ + vty_out(vty, "No\n"); \ + } while (0) + +#define PRINT_EOR_JSON(_eor_flag) \ + do { \ + if (eor_flag) \ + json_object_boolean_true_add( \ + json_endofrib_status, \ + "endOfRibSentAfterUpdate"); \ + else \ + json_object_boolean_false_add( \ + json_endofrib_status, \ + "endOfRibSentAfterUpdate"); \ + } while (0) + extern void bgp_vty_init(void); extern const char *get_afi_safi_str(afi_t afi, safi_t safi, bool for_json); extern int bgp_get_vty(struct bgp **bgp, as_t *as, const char *name, -- cgit v1.2.3