]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd, pimd: fix coverity SA warnings
authorMark Stapp <mjs@voltanet.io>
Mon, 1 Mar 2021 13:46:29 +0000 (08:46 -0500)
committerMark Stapp <mjs@voltanet.io>
Mon, 1 Mar 2021 13:46:29 +0000 (08:46 -0500)
Fix a couple of coverity warnings in pim and bgp.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
bgpd/bgp_evpn_mh.c
pimd/pim_nb_config.c

index 0b026692112decccc6af27aa1f2463e4caf3c9e1..6fe7106df192c4a1dd3594fe59589d4aff42d76e 100644 (file)
@@ -1701,7 +1701,7 @@ static void bgp_evpn_local_es_activate(struct bgp *bgp, struct bgp_evpn_es *es,
                /* generate EAD-ES */
                build_evpn_type1_prefix(&p, BGP_EVPN_AD_ES_ETH_TAG, &es->esi,
                                        es->originator_ip);
-               bgp_evpn_type1_route_update(bgp, es, NULL, &p);
+               (void)bgp_evpn_type1_route_update(bgp, es, NULL, &p);
        }
 }
 
index 11cfe09964389a7c6e99add26d4d03fc3b940be6..5963a651d2d8ecedacf52b007cf29d3a4f59b48f 100644 (file)
@@ -2411,7 +2411,7 @@ int lib_interface_pim_address_family_mroute_oif_modify(
                }
 
 #ifdef PIM_ENFORCE_LOOPFREE_MFC
-               if (iif->ifindex == oif->ifindex) {
+               if (oif && iif && (iif->ifindex == oif->ifindex)) {
                        strlcpy(args->errmsg,
                                "% IIF same as OIF and loopfree enforcement is enabled; rejecting",
                                args->errmsg_len);