diff options
| author | bisdhdh <biswajit.sadhu@gmail.com> | 2019-10-24 20:29:43 +0530 |
|---|---|---|
| committer | bisdhdh <biswajit.sadhu@gmail.com> | 2020-01-23 09:34:25 +0530 |
| commit | 9e3b51a7f3d111e6c01424dae801501f7053bc60 (patch) | |
| tree | 3cb2c80f6ed3950ac2034a85a367a8125b26be23 /bgpd/bgp_vty.c | |
| parent | d6e3c15b6294acc52ba8078000ed12dd13f25034 (diff) | |
bgpd: Restarting node does not send EOR after the convergence.
*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 <sadhub@vmware.com>
Diffstat (limited to 'bgpd/bgp_vty.c')
| -rw-r--r-- | bgpd/bgp_vty.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 71a41cd688..c4689989c7 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -9474,6 +9474,7 @@ static void bgp_show_neighbor_graceful_restart_capability_per_afi_safi( json_object *json_afi_safi = NULL; json_object *json_timer = NULL; json_object *json_endofrib_status = NULL; + bool eor_flag = false; for (afi = AFI_IP; afi < AFI_MAX; afi++) { for (safi = SAFI_UNICAST; safi <= SAFI_MPLS_VPN; safi++) { @@ -9490,6 +9491,12 @@ static void bgp_show_neighbor_graceful_restart_capability_per_afi_safi( json_object_new_object(); } + if (peer->eor_stime[afi][safi] >= + peer->pkt_stime[afi][safi]) + eor_flag = true; + else + eor_flag = false; + if (!use_json) { vty_out(vty, " %s :\n", get_afi_safi_str(afi, safi, false)); @@ -9555,22 +9562,32 @@ static void bgp_show_neighbor_graceful_restart_capability_per_afi_safi( if (CHECK_FLAG(peer->af_sflags[afi][safi], PEER_STATUS_EOR_SEND)) { - if (use_json) { json_object_boolean_true_add( json_endofrib_status, "endOfRibSend"); + + PRINT_EOR_JSON(eor_flag); } else { vty_out(vty, "Yes\n"); - } + vty_out(vty, + " EoRSentAfterUpdate : "); + PRINT_EOR(eor_flag); + } } else { if (use_json) { json_object_boolean_false_add( json_endofrib_status, "endOfRibSend"); + json_object_boolean_false_add( + json_endofrib_status, + "endOfRibSentAfterUpdate"); } else { vty_out(vty, "No\n"); + vty_out(vty, + " EoRSentAfterUpdate : "); + vty_out(vty, "No\n"); } } |
