]> git.proxmox.com Git - mirror_frr.git/commitdiff
bgpd: fix uninitialized value in show cmd
authorQuentin Young <qlyoung@cumulusnetworks.com>
Fri, 15 Sep 2017 16:11:17 +0000 (12:11 -0400)
committerQuentin Young <qlyoung@cumulusnetworks.com>
Fri, 15 Sep 2017 16:24:51 +0000 (12:24 -0400)
When unsupported EVPN route types are are received / displayed with a
show command we print an uninitialized stack buffer.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
bgpd/bgp_evpn.c

index 7b3a8ef098ec1ddbdd51bdab90d28fa3b2ac165f..6923479cb2eafc577fb6dea5f7e4dadcd3e959d5 100644 (file)
@@ -2287,6 +2287,8 @@ char *bgp_evpn_route2str(struct prefix_evpn *p, char *buf, int len)
                }
        } else {
                /* For EVPN route types not supported yet. */
+               snprintf(buf, len, "(unsupported route type %d)",
+                        p->prefix.route_type);
        }
 
        return (buf);