From b6bf1505df0d8fa7d566126e6ea2aa9b9f9c8f54 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Tue, 11 Oct 2016 08:47:32 -0400 Subject: [PATCH] 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 Reviewed-by: Lou Berger --- bgpd/rfapi/rfapi_vty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bgpd/rfapi/rfapi_vty.c b/bgpd/rfapi/rfapi_vty.c index 90c0e63a7a..1978bec280 100644 --- a/bgpd/rfapi/rfapi_vty.c +++ b/bgpd/rfapi/rfapi_vty.c @@ -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))