]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra: zevpn cannot be null passed into zebra_evpn_es_evi_show_one_evpn
authorDonald Sharp <sharpd@cumulusnetworks.com>
Sat, 15 Aug 2020 17:41:18 +0000 (13:41 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Sun, 11 Oct 2020 14:47:37 +0000 (10:47 -0400)
In zebra_evpn_es_evi_show_vni the zevpn pointer if passed into
zebra_evpn_es_evi_show_one_evi will crash if it is null and
we have code that checks that it is non null and then immediately
calls the function.  Add a return to prevent a crash.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
zebra/zebra_evpn_mh.c

index f71065cdcffdb1586acc6f02705fcb2dcd9cb950..a406884187b7d47fa21fb7976510f71d1b8d4c3b 100644 (file)
@@ -358,6 +358,8 @@ void zebra_evpn_es_evi_show_vni(struct vty *vty, bool uj, vni_t vni, int detail)
        } else {
                if (!uj)
                        vty_out(vty, "VNI %d doesn't exist\n", vni);
+
+               return;
        }
        zebra_evpn_es_evi_show_one_evpn(zevpn, vty, json, detail);
 }