summaryrefslogtreecommitdiff
path: root/bgpd/bgp_route.c
diff options
context:
space:
mode:
Diffstat (limited to 'bgpd/bgp_route.c')
-rw-r--r--bgpd/bgp_route.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index a91292d971..dce8859bc8 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -9672,9 +9672,8 @@ void route_vty_out_tag(struct vty *vty, const struct prefix *p,
}
}
- label = decode_label(&path->extra->label[0]);
-
- if (bgp_is_valid_label(&label)) {
+ if (bgp_is_valid_label(&path->extra->label[0])) {
+ label = decode_label(&path->extra->label[0]);
if (json) {
json_object_int_add(json_out, "notag", label);
json_object_array_add(json, json_out);