bgp: Fix bi->extra->tag if statement

bi->extra->tag is a 3 byte array, the statement
as written will always be true.  Modify code
to see if we actually have any data in the
tag and then print the label.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Lou Berger <lberger@labn.net>
This commit is contained in:
Donald Sharp 2016-10-11 08:47:32 -04:00
parent d8e012a89e
commit b6bf1505df

View File

@ -487,7 +487,7 @@ rfapi_vty_out_vncinfo (
XFREE (MTYPE_ECOMMUNITY_STR, s);
}
if (bi->extra != NULL && bi->extra->tag != NULL)
if (bi->extra != NULL)
vty_out (vty, " label=%u", decode_label (bi->extra->tag));
if (rfapiGetVncLifetime (bi->attr, &lifetime))