]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib: prefix2str initialises incoming buffer in case erroneous EVPN pfx
authorPhilippe Guibert <philippe.guibert@6wind.com>
Tue, 14 Feb 2017 10:54:33 +0000 (11:54 +0100)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Tue, 14 Feb 2017 12:59:00 +0000 (13:59 +0100)
In the case, evpn prefix is requested to be transformed into string, and
if the evpn prefix is not an evpn route type 5 entry, then the prefix is
returning an initialised string that mentions the vpn prefix is unknown.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
lib/prefix.c

index 8948a2ac19e50bd3b03fcadecd40050e360b173e..19cf7dd8f98a6aa6b391b9267e7362ce2ae77f83 100644 (file)
@@ -880,6 +880,10 @@ prefix2str (union prefixconstptr pu, char *str, int size)
                                  buf, PREFIX2STR_BUFFER),
                       p->prefixlen);
           }
+        else
+          {
+            sprintf (str, "UNK AF_ETHER prefix");
+          }
         break;
       default:
         sprintf (str, "UNK prefix");