lib: prefix2str initialises incoming buffer in case erroneous EVPN pfx

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>
This commit is contained in:
Philippe Guibert 2017-02-14 11:54:33 +01:00
parent e2858b13a9
commit 43b4350ca7

View 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");