diff options
| author | Donatas Abraitis <donatas.abraitis@gmail.com> | 2020-07-27 17:20:51 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-27 17:20:51 +0300 |
| commit | db8a7160daedd31f22c3380c9c7e579b3a2d3449 (patch) | |
| tree | 6c455a3ebe0a8a22abf9087d7b46b6c0f984bb1b | |
| parent | 6c4b304f3359131750aec5b07d469e735eaad855 (diff) | |
| parent | 5f140efeeffdd9951456701b78a70a71b879be5a (diff) | |
Merge pull request #6803 from donaldsharp/coverity_moo_moo
Coverity code cleanup
| -rw-r--r-- | bgpd/bgp_bmp.c | 5 | ||||
| -rw-r--r-- | bgpd/bgp_evpn_vty.c | 6 | ||||
| -rw-r--r-- | bgpd/bgp_main.c | 15 |
3 files changed, 18 insertions, 8 deletions
diff --git a/bgpd/bgp_bmp.c b/bgpd/bgp_bmp.c index db330f998c..af88547ca9 100644 --- a/bgpd/bgp_bmp.c +++ b/bgpd/bgp_bmp.c @@ -951,8 +951,11 @@ afibreak: /* initialize syncrdpos to the first * mid-layer table entry */ - if (!bmp->syncrdpos) + if (!bmp->syncrdpos) { bmp->syncrdpos = bgp_table_top(table); + if (!bmp->syncrdpos) + goto eor; + } /* look for a valid mid-layer table */ do { diff --git a/bgpd/bgp_evpn_vty.c b/bgpd/bgp_evpn_vty.c index 2cb13fb85f..2584939378 100644 --- a/bgpd/bgp_evpn_vty.c +++ b/bgpd/bgp_evpn_vty.c @@ -3899,6 +3899,12 @@ DEFPY (bgp_evpn_advertise_pip_ip_mac, struct listnode *node = NULL; struct bgpevpn *vpn = NULL; + /* + * At this point if bgp_evpn is NULL and evpn is enabled + * something stupid has gone wrong + */ + assert(bgp_evpn); + update_advertise_vrf_routes(bgp_vrf); /* Update (svi) type-2 routes */ diff --git a/bgpd/bgp_main.c b/bgpd/bgp_main.c index 33eaf9ae74..b082aa9c6a 100644 --- a/bgpd/bgp_main.c +++ b/bgpd/bgp_main.c @@ -133,19 +133,20 @@ void sighup(void) /* * This is turned off for the moment. There is all * sorts of config turned off by bgp_terminate - * that is not setup properly again in bgp_rest. + * that is not setup properly again in bgp_reset. * I see no easy way to do this nor do I see that * this is a desirable way to reload config * given the yang work. */ /* Terminate all thread. */ - bgp_terminate(); - bgp_reset(); - zlog_info("bgpd restarting!"); - - /* Reload config file. */ - vty_read_config(NULL, bgpd_di.config_file, config_default); + /* + * bgp_terminate(); + * bgp_reset(); + * zlog_info("bgpd restarting!"); + * Reload config file. + * vty_read_config(NULL, bgpd_di.config_file, config_default); + */ /* Try to return to normal operation. */ } |
