diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-08-25 01:54:21 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-08-25 02:34:28 +0200 |
commit | e691f179b6c6fc26536e68958f19ff6983a03274 (patch) | |
tree | 9b00aba37c7ce79b5f51b314d1a7aa66fa127682 /pimd/pim_instance.c | |
parent | eigrpd, ospfd: Cleanup inet_aton return code checking (diff) | |
download | frr-e691f179b6c6fc26536e68958f19ff6983a03274.tar.xz frr-e691f179b6c6fc26536e68958f19ff6983a03274.zip |
pimd: Cleanup a variety of SA issues
1) Error check return from setsockopt and sockets
2) Check return codes for str2prefix
3) Clean up some potential NULL References
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_instance.c')
-rw-r--r-- | pimd/pim_instance.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/pimd/pim_instance.c b/pimd/pim_instance.c index 7fc77556e..d1f8085b4 100644 --- a/pimd/pim_instance.c +++ b/pimd/pim_instance.c @@ -195,11 +195,16 @@ static int pim_vrf_config_write(struct vty *vty) RB_FOREACH(vrf, vrf_name_head, &vrfs_by_name) { pim = vrf->info; - if (!pim || vrf->vrf_id != VRF_DEFAULT) { - vty_out(vty, "vrf %s\n", vrf->name); - pim_global_config_write_worker(pim, vty); - vty_out(vty, "!\n"); - } + + if (!pim) + continue; + + if (vrf->vrf_id == VRF_DEFAULT) + continue; + + vty_out(vty, "vrf %s\n", vrf->name); + pim_global_config_write_worker(pim, vty); + vty_out(vty, "!\n"); } return 0; |