diff options
| author | Philippe Guibert <philippe.guibert@6wind.com> | 2017-02-14 11:54:33 +0100 |
|---|---|---|
| committer | Philippe Guibert <philippe.guibert@6wind.com> | 2017-02-14 13:59:00 +0100 |
| commit | 43b4350ca7efa79f393cf68c62b5be5614ac9a11 (patch) | |
| tree | f1cabc09642ce547b68f860ea4db20990328b49b | |
| parent | e2858b13a9f2faf4b5e44021ce206facc43efc19 (diff) | |
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>
| -rw-r--r-- | lib/prefix.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/prefix.c b/lib/prefix.c index 8948a2ac19..19cf7dd8f9 100644 --- a/lib/prefix.c +++ b/lib/prefix.c @@ -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"); |
