diff options
Diffstat (limited to 'lib/nexthop_group.c')
| -rw-r--r-- | lib/nexthop_group.c | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/lib/nexthop_group.c b/lib/nexthop_group.c index 97d70189ff..e8c678ad71 100644 --- a/lib/nexthop_group.c +++ b/lib/nexthop_group.c @@ -953,12 +953,6 @@ DEFPY(ecmp_nexthops, ecmp_nexthops_cmd, nhg_hooks.add_nexthop(nhgc, nh); } - if (intf) { - struct interface *ifp = if_lookup_by_name_all_vrf(intf); - - if (ifp) - ifp->configured = true; - } return CMD_SUCCESS; } @@ -1041,7 +1035,6 @@ void nexthop_group_write_nexthop(struct vty *vty, const struct nexthop *nh) void nexthop_group_json_nexthop(json_object *j, const struct nexthop *nh) { - char buf[100]; struct vrf *vrf; json_object *json_backups = NULL; int i; @@ -1052,26 +1045,18 @@ void nexthop_group_json_nexthop(json_object *j, const struct nexthop *nh) ifindex2ifname(nh->ifindex, nh->vrf_id)); break; case NEXTHOP_TYPE_IPV4: - json_object_string_add( - j, "nexthop", - inet_ntop(AF_INET, &nh->gate.ipv4, buf, sizeof(buf))); + json_object_string_addf(j, "nexthop", "%pI4", &nh->gate.ipv4); break; case NEXTHOP_TYPE_IPV4_IFINDEX: - json_object_string_add( - j, "nexthop", - inet_ntop(AF_INET, &nh->gate.ipv4, buf, sizeof(buf))); + json_object_string_addf(j, "nexthop", "%pI4", &nh->gate.ipv4); json_object_string_add(j, "vrfId", ifindex2ifname(nh->ifindex, nh->vrf_id)); break; case NEXTHOP_TYPE_IPV6: - json_object_string_add( - j, "nexthop", - inet_ntop(AF_INET6, &nh->gate.ipv6, buf, sizeof(buf))); + json_object_string_addf(j, "nexthop", "%pI6", &nh->gate.ipv6); break; case NEXTHOP_TYPE_IPV6_IFINDEX: - json_object_string_add( - j, "nexthop", - inet_ntop(AF_INET6, &nh->gate.ipv6, buf, sizeof(buf))); + json_object_string_addf(j, "nexthop", "%pI6", &nh->gate.ipv6); json_object_string_add(j, "vrfId", ifindex2ifname(nh->ifindex, nh->vrf_id)); break; @@ -1265,7 +1250,6 @@ void nexthop_group_interface_state_change(struct interface *ifp, if (ifp->ifindex != nhop.ifindex) continue; - ifp->configured = true; nh = nexthop_new(); memcpy(nh, &nhop, sizeof(nhop)); |
