File tree 1 file changed +10
-13
lines changed
1 file changed +10
-13
lines changed Original file line number Diff line number Diff line change @@ -582,30 +582,27 @@ static void zserv_client_free(struct zserv *client)
582
582
583
583
/* Close file descriptor. */
584
584
if (client -> sock ) {
585
- unsigned long nroutes ;
586
- unsigned long nnhgs ;
585
+ unsigned long nroutes = 0 ;
586
+ unsigned long nnhgs = 0 ;
587
587
588
588
close (client -> sock );
589
589
590
- /* If this is a synchronous BGP Zebra client for label/table
591
- * manager, then ignore it. It's not GR-aware, and causes GR to
592
- * be skipped for the session_id == 0 (asynchronous).
593
- */
594
- if (client -> proto == ZEBRA_ROUTE_BGP && client -> session_id == 1 )
595
- return ;
596
-
597
590
if (DYNAMIC_CLIENT_GR_DISABLED (client )) {
598
- zebra_mpls_client_cleanup_vrf_label (client -> proto );
591
+ if (!client -> synchronous ) {
592
+ zebra_mpls_client_cleanup_vrf_label (
593
+ client -> proto );
599
594
600
- nroutes = rib_score_proto (client -> proto ,
601
- client -> instance );
595
+ nroutes = rib_score_proto (client -> proto ,
596
+ client -> instance );
597
+ }
602
598
zlog_notice (
603
599
"client %d disconnected %lu %s routes removed from the rib" ,
604
600
client -> sock , nroutes ,
605
601
zebra_route_string (client -> proto ));
606
602
607
603
/* Not worrying about instance for now */
608
- nnhgs = zebra_nhg_score_proto (client -> proto );
604
+ if (!client -> synchronous )
605
+ nnhgs = zebra_nhg_score_proto (client -> proto );
609
606
zlog_notice (
610
607
"client %d disconnected %lu %s nhgs removed from the rib" ,
611
608
client -> sock , nnhgs ,
You can’t perform that action at this time.
0 commit comments