#include "log.h"
#include "sockunion.h"
#include "linklist.h"
-#include "thread.h"
+#include "frrevent.h"
#include "workqueue.h"
#include "prefix.h"
#include "routemap.h"
*nht_exists = false;
- zvrf = vrf_info_lookup(vrf_id);
+ zvrf = zebra_vrf_lookup_by_id(vrf_id);
if (!zvrf)
return;
label_index < nexthop->nh_label->num_labels; label_index++)
json_object_array_add(
json_labels,
- json_object_new_int(
- nexthop->nh_label->label[label_index]));
+ json_object_new_int((
+ (nexthop->nh_label_type ==
+ ZEBRA_LSP_EVPN)
+ ? label2vni(
+ &nexthop->nh_label->label
+ [label_index])
+ : nexthop->nh_label->label
+ [label_index])));
json_object_object_add(json_nexthop, "labels", json_labels);
}
vty_out(vty, ", label %s",
mpls_label2str(nexthop->nh_label->num_labels,
nexthop->nh_label->label, buf,
- sizeof(buf), 1));
+ sizeof(buf), nexthop->nh_label_type, 1));
}
if (nexthop->nh_srv6) {
seg6local_context2str(buf, sizeof(buf),
&nexthop->nh_srv6->seg6local_ctx,
nexthop->nh_srv6->seg6local_action);
- vty_out(vty, ", seg6local %s %s",
- seg6local_action2str(
- nexthop->nh_srv6->seg6local_action),
- buf);
- vty_out(vty, ", seg6 %pI6", &nexthop->nh_srv6->seg6_segs);
+ if (nexthop->nh_srv6->seg6local_action !=
+ ZEBRA_SEG6_LOCAL_ACTION_UNSPEC)
+ vty_out(vty, ", seg6local %s %s",
+ seg6local_action2str(
+ nexthop->nh_srv6->seg6local_action),
+ buf);
+ if (IPV6_ADDR_CMP(&nexthop->nh_srv6->seg6_segs, &in6addr_any))
+ vty_out(vty, ", seg6 %pI6",
+ &nexthop->nh_srv6->seg6_segs);
}
if (nexthop->weight)