diff options
author | Philippe Guibert <philippe.guibert@6wind.com> | 2023-04-20 18:33:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-20 18:33:21 +0200 |
commit | 7b343a9ed5381d6e66cb68a6aa396d2194de7444 (patch) | |
tree | ce55d7f53e9f05634719b44217cf132bb4ebc952 | |
parent | Merge pull request #13329 from Pdoijode/pdoijode/bgp-attr-crash-fix (diff) | |
parent | tests: Update TE topotests to follow new Edge Key (diff) | |
download | frr-7b343a9ed5381d6e66cb68a6aa396d2194de7444.tar.xz frr-7b343a9ed5381d6e66cb68a6aa396d2194de7444.zip |
Merge pull request #12933 from Orange-OpenSource/link_state
lib: Update edge key in link state database
23 files changed, 360 insertions, 277 deletions
diff --git a/isisd/isis_te.c b/isisd/isis_te.c index c734ff95d..90b53c540 100644 --- a/isisd/isis_te.c +++ b/isisd/isis_te.c @@ -825,7 +825,7 @@ static struct ls_edge *get_edge(struct ls_ted *ted, struct ls_attributes *attr) { struct ls_edge *edge; struct ls_standard *std; - uint64_t key = 0; + struct ls_edge_key key; /* Check parameters */ if (!ted || !attr) @@ -834,19 +834,22 @@ static struct ls_edge *get_edge(struct ls_ted *ted, struct ls_attributes *attr) std = &attr->standard; /* Compute keys in function of local address (IPv4/v6) or identifier */ - if (CHECK_FLAG(attr->flags, LS_ATTR_LOCAL_ADDR)) - key = ((uint64_t)ntohl(std->local.s_addr)) & 0xffffffff; - else if (CHECK_FLAG(attr->flags, LS_ATTR_LOCAL_ADDR6)) - key = ((uint64_t)ntohl(std->local6.s6_addr32[2]) << 32 - | (uint64_t)ntohl(std->local6.s6_addr32[3])); - else if (CHECK_FLAG(attr->flags, LS_ATTR_LOCAL_ID)) - key = ((uint64_t)std->remote_id << 32) - | (((uint64_t)std->local_id) & 0xffffffff); - else - key = 0; + if (CHECK_FLAG(attr->flags, LS_ATTR_LOCAL_ADDR)) { + key.family = AF_INET; + IPV4_ADDR_COPY(&key.k.addr, &std->local); + } else if (CHECK_FLAG(attr->flags, LS_ATTR_LOCAL_ADDR6)) { + key.family = AF_INET6; + IPV6_ADDR_COPY(&key.k.addr6, &std->local6); + } else if (CHECK_FLAG(attr->flags, LS_ATTR_LOCAL_ID)) { + key.family = AF_LOCAL; + key.k.link_id = (((uint64_t)std->local_id) & 0xffffffff) | + ((uint64_t)std->remote_id << 32); + } else { + key.family = AF_UNSPEC; + } /* Stop here if we don't got a valid key */ - if (key == 0) + if (key.family == AF_UNSPEC) return NULL; /* Get corresponding Edge by key from Link State Data Base */ @@ -865,18 +868,17 @@ static struct ls_edge *get_edge(struct ls_ted *ted, struct ls_attributes *attr) } if (CHECK_FLAG(edge->attributes->flags, LS_ATTR_LOCAL_ADDR)) - te_debug(" |- %s Edge (%" PRIu64 - ") from Extended Reach. %pI4", - edge->status == NEW ? "Create" : "Found", edge->key, - &attr->standard.local); + te_debug(" |- %s Edge (%pI4) from Extended Reach. %pI4", + edge->status == NEW ? "Create" : "Found", + &edge->key.k.addr, &attr->standard.local); else if (CHECK_FLAG(edge->attributes->flags, LS_ATTR_LOCAL_ADDR6)) - te_debug(" |- %s Edge (%" PRIu64 - ") from Extended Reach. %pI6", - edge->status == NEW ? "Create" : "Found", edge->key, - &attr->standard.local6); + te_debug(" |- %s Edge (%pI6) from Extended Reach. %pI6", + edge->status == NEW ? "Create" : "Found", + &edge->key.k.addr6, &attr->standard.local6); else te_debug(" |- %s Edge (%" PRIu64 ")", - edge->status == NEW ? "Create" : "Found", edge->key); + edge->status == NEW ? "Create" : "Found", + edge->key.k.link_id); return edge; } @@ -1118,8 +1120,21 @@ static int lsp_to_edge_cb(const uint8_t *id, uint32_t metric, bool old_metric, } /* Try to update remote Link from remote address or reachability ID */ - te_debug(" |- Link Edge (%" PRIu64 ") to destination vertex (%s)", - edge->key, print_sys_hostname(id)); + if (edge->key.family == AF_INET) + te_debug(" |- Link Edge (%pI4) to destination vertex (%s)", + &edge->key.k.addr, print_sys_hostname(id)); + else if (edge->key.family == AF_INET6) + te_debug(" |- Link Edge (%pI6) to destination vertex (%s)", + &edge->key.k.addr6, print_sys_hostname(id)); + else if (edge->key.family == AF_LOCAL) + te_debug(" |- Link Edge (%" PRIu64 + ") to destination vertex (%s)", + edge->key.k.link_id, print_sys_hostname(id)); + else + te_debug( + " |- Link Edge (Unknown) to destination vertex (%s)", + print_sys_hostname(id)); + dst = ls_find_edge_by_destination(args->ted, edge->attributes); if (dst) { /* Attach remote link if not set */ @@ -1909,7 +1924,7 @@ static int show_ted(struct vty *vty, struct cmd_token *argv[], int argc, struct ls_vertex *vertex; struct ls_edge *edge; struct ls_subnet *subnet; - uint64_t key; + struct ls_edge_key key; bool detail = false; bool uj = use_json(argc, argv); json_object *json = NULL; @@ -1963,7 +1978,8 @@ static int show_ted(struct vty *vty, struct cmd_token *argv[], int argc, return CMD_WARNING_CONFIG_FAILED; } /* Get the Edge from the Link State Database */ - key = ((uint64_t)ntohl(ip_addr.s_addr)) & 0xffffffff; + key.family = AF_INET; + IPV4_ADDR_COPY(&key.k.addr, &ip_addr); edge = ls_find_edge_by_key(ted, key); if (!edge) { vty_out(vty, "No edge found for ID %pI4\n", @@ -1978,8 +1994,8 @@ static int show_ted(struct vty *vty, struct cmd_token *argv[], int argc, return CMD_WARNING_CONFIG_FAILED; } /* Get the Edge from the Link State Database */ - key = (uint64_t)ntohl(ip6_addr.s6_addr32[3]) - | ((uint64_t)ntohl(ip6_addr.s6_addr32[2]) << 32); + key.family = AF_INET6; + IPV6_ADDR_COPY(&key.k.addr6, &ip6_addr); edge = ls_find_edge_by_key(ted, key); if (!edge) { vty_out(vty, "No edge found for ID %pI6\n", diff --git a/lib/link_state.c b/lib/link_state.c index 7f20cdcf5..752030cd4 100644 --- a/lib/link_state.c +++ b/lib/link_state.c @@ -674,9 +674,9 @@ static void ls_edge_connect_to(struct ls_ted *ted, struct ls_edge *edge) } } -static uint64_t get_edge_key(struct ls_attributes *attr, bool dst) +static struct ls_edge_key get_edge_key(struct ls_attributes *attr, bool dst) { - uint64_t key = 0; + struct ls_edge_key key = {.family = AF_UNSPEC}; struct ls_standard *std; if (!attr) @@ -685,30 +685,37 @@ static uint64_t get_edge_key(struct ls_attributes *attr, bool dst) std = &attr->standard; if (dst) { - /* Key is the IPv4 remote address */ - if (CHECK_FLAG(attr->flags, LS_ATTR_NEIGH_ADDR)) - key = ((uint64_t)ntohl(std->remote.s_addr)) - & 0xffffffff; - /* or the 64 bits LSB of IPv6 remote address */ - else if (CHECK_FLAG(attr->flags, LS_ATTR_NEIGH_ADDR6)) - key = ((uint64_t)ntohl(std->remote6.s6_addr32[2]) << 32 - | (uint64_t)ntohl(std->remote6.s6_addr32[3])); - /* of remote identifier if no IP addresses are defined */ - else if (CHECK_FLAG(attr->flags, LS_ATTR_NEIGH_ID)) - key = (((uint64_t)std->remote_id) & 0xffffffff) - | ((uint64_t)std->local_id << 32); + if (CHECK_FLAG(attr->flags, LS_ATTR_NEIGH_ADDR)) { + /* Key is the IPv4 remote address */ + key.family = AF_INET; + IPV4_ADDR_COPY(&key.k.addr, &std->remote); + } else if (CHECK_FLAG(attr->flags, LS_ATTR_NEIGH_ADDR6)) { + /* or the IPv6 remote address */ + key.family = AF_INET6; + IPV6_ADDR_COPY(&key.k.addr6, &std->remote6); + } else if (CHECK_FLAG(attr->flags, LS_ATTR_NEIGH_ID)) { + /* or Remote identifier if IP addr. are not defined */ + key.family = AF_LOCAL; + key.k.link_id = + (((uint64_t)std->remote_id) & 0xffffffff) | + ((uint64_t)std->local_id << 32); + } } else { - /* Key is the IPv4 local address */ - if (CHECK_FLAG(attr->flags, LS_ATTR_LOCAL_ADDR)) - key = ((uint64_t)ntohl(std->local.s_addr)) & 0xffffffff; - /* or the 64 bits LSB of IPv6 local address */ - else if (CHECK_FLAG(attr->flags, LS_ATTR_LOCAL_ADDR6)) - key = ((uint64_t)ntohl(std->local6.s6_addr32[2]) << 32 - | (uint64_t)ntohl(std->local6.s6_addr32[3])); - /* of local identifier if no IP addresses are defined */ - else if (CHECK_FLAG(attr->flags, LS_ATTR_LOCAL_ID)) - key = (((uint64_t)std->local_id) & 0xffffffff) - | ((uint64_t)std->remote_id << 32); + if (CHECK_FLAG(attr->flags, LS_ATTR_LOCAL_ADDR)) { + /* Key is the IPv4 local address */ + key.family = AF_INET; + IPV4_ADDR_COPY(&key.k.addr, &std->local); + } else if (CHECK_FLAG(attr->flags, LS_ATTR_LOCAL_ADDR6)) { + /* or the 64 bits LSB of IPv6 local address */ + key.family = AF_INET6; + IPV6_ADDR_COPY(&key.k.addr6, &std->local6); + } else if (CHECK_FLAG(attr->flags, LS_ATTR_LOCAL_ID)) { + /* or Remote identifier if IP addr. are not defined */ + key.family = AF_LOCAL; + key.k.link_id = + (((uint64_t)std->local_id) & 0xffffffff) | + ((uint64_t)std->remote_id << 32); + } } return key; @@ -718,13 +725,13 @@ struct ls_edge *ls_edge_add(struct ls_ted *ted, struct ls_attributes *attributes) { struct ls_edge *new; - uint64_t key = 0; + struct ls_edge_key key; if (attributes == NULL) return NULL; key = get_edge_key(attributes, false); - if (key == 0) + if (key.family == AF_UNSPEC) return NULL; /* Create Edge and add it to the TED */ @@ -742,11 +749,12 @@ struct ls_edge *ls_edge_add(struct ls_ted *ted, return new; } -struct ls_edge *ls_find_edge_by_key(struct ls_ted *ted, const uint64_t key) +struct ls_edge *ls_find_edge_by_key(struct ls_ted *ted, + const struct ls_edge_key key) { struct ls_edge edge = {}; - if (key == 0) + if (key.family == AF_UNSPEC) return NULL; edge.key = key; @@ -762,7 +770,7 @@ struct ls_edge *ls_find_edge_by_source(struct ls_ted *ted, return NULL; edge.key = get_edge_key(attributes, false); - if (edge.key == 0) + if (edge.key.family == AF_UNSPEC) return NULL; return edges_find(&ted->edges, &edge); @@ -777,7 +785,7 @@ struct ls_edge *ls_find_edge_by_destination(struct ls_ted *ted, return NULL; edge.key = get_edge_key(attributes, true); - if (edge.key == 0) + if (edge.key.family == AF_UNSPEC) return NULL; return edges_find(&ted->edges, &edge); @@ -815,7 +823,7 @@ int ls_edge_same(struct ls_edge *e1, struct ls_edge *e2) if (!e1 && !e2) return 1; - if (e1->key != e2->key) + if (edge_cmp(e1, e2) != 0) return 0; if (e1->attributes == e2->attributes) @@ -2189,6 +2197,34 @@ void ls_show_vertices(struct ls_ted *ted, struct vty *vty, } } +static const char *edge_key_to_text(struct ls_edge_key key) +{ +#define FORMAT_BUF_COUNT 4 + static char buf_ring[FORMAT_BUF_COUNT][INET6_BUFSIZ]; + static size_t cur_buf = 0; + char *rv; + + rv = buf_ring[cur_buf]; + cur_buf = (cur_buf + 1) % FORMAT_BUF_COUNT; + + switch (key.family) { + case AF_INET: + snprintfrr(rv, INET6_BUFSIZ, "%pI4", &key.k.addr); + break; + case AF_INET6: + snprintfrr(rv, INET6_BUFSIZ, "%pI6", &key.k.addr6); + break; + case AF_LOCAL: + snprintfrr(rv, INET6_BUFSIZ, "%" PRIu64, key.k.link_id); + break; + default: + snprintfrr(rv, INET6_BUFSIZ, "(Unknown)"); + break; + } + + return rv; +} + static void ls_show_edge_vty(struct ls_edge *edge, struct vty *vty, bool verbose) { @@ -2201,7 +2237,7 @@ static void ls_show_edge_vty(struct ls_edge *edge, struct vty *vty, attr = edge->attributes; sbuf_init(&sbuf, NULL, 0); - sbuf_push(&sbuf, 2, "Edge (%" PRIu64 "): ", edge->key); + sbuf_push(&sbuf, 2, "Edge (%s): ", edge_key_to_text(edge->key)); if (CHECK_FLAG(attr->flags, LS_ATTR_LOCAL_ADDR)) sbuf_push(&sbuf, 0, "%pI4", &attr->standard.local); else if (CHECK_FLAG(attr->flags, LS_ATTR_LOCAL_ADDR6)) @@ -2360,7 +2396,7 @@ static void ls_show_edge_json(struct ls_edge *edge, struct json_object *json) attr = edge->attributes; - json_object_int_add(json, "edge-id", edge->key); + json_object_string_add(json, "edge-id", edge_key_to_text(edge->key)); json_object_string_add(json, "status", status2txt[edge->status]); json_object_string_add(json, "origin", origin2txt[attr->adv.origin]); ls_node_id_to_text(attr->adv, buf, INET6_BUFSIZ); @@ -2738,8 +2774,8 @@ void ls_dump_ted(struct ls_ted *ted) for (ALL_LIST_ELEMENTS_RO(vertex->incoming_edges, lst_node, vertex_edge)) { zlog_debug( - " inc edge key:%" PRIu64 " attr key:%pI4 loc:(%pI4) rmt:(%pI4)", - vertex_edge->key, + " inc edge key:%s attr key:%pI4 loc:(%pI4) rmt:(%pI4)", + edge_key_to_text(vertex_edge->key), &vertex_edge->attributes->adv.id.ip.addr, &vertex_edge->attributes->standard.local, &vertex_edge->attributes->standard.remote); @@ -2747,15 +2783,16 @@ void ls_dump_ted(struct ls_ted *ted) for (ALL_LIST_ELEMENTS_RO(vertex->outgoing_edges, lst_node, vertex_edge)) { zlog_debug( - " out edge key:%" PRIu64 " attr key:%pI4 loc:(%pI4) rmt:(%pI4)", - vertex_edge->key, + " out edge key:%s attr key:%pI4 loc:(%pI4) rmt:(%pI4)", + edge_key_to_text(vertex_edge->key), &vertex_edge->attributes->adv.id.ip.addr, &vertex_edge->attributes->standard.local, &vertex_edge->attributes->standard.remote); } } frr_each (edges, &ted->edges, edge) { - zlog_debug(" Ted edge key:%" PRIu64 "src:%pI4 dst:%pI4", edge->key, + zlog_debug(" Ted edge key:%s src:%pI4 dst:%pI4", + edge_key_to_text(edge->key), edge->source ? &edge->source->node->router_id : &inaddr_any, edge->destination diff --git a/lib/link_state.h b/lib/link_state.h index 3d2ed7a87..d3a0ce39d 100644 --- a/lib/link_state.h +++ b/lib/link_state.h @@ -385,13 +385,23 @@ struct ls_vertex { struct list *prefixes; /* List of advertised prefix */ }; +/* Link State Edge Key structure */ +struct ls_edge_key { + uint8_t family; + union { + struct in_addr addr; + struct in6_addr addr6; + uint64_t link_id; + } k; +}; + /* Link State Edge structure */ PREDECL_RBTREE_UNIQ(edges); struct ls_edge { enum ls_type type; /* Link State Type */ enum ls_status status; /* Status of the Edge in the TED */ struct edges_item entry; /* Entry in RB tree */ - uint64_t key; /* Unique Key identifier */ + struct ls_edge_key key; /* Unique Key identifier */ struct ls_attributes *attributes; /* Link State attributes */ struct ls_vertex *source; /* Pointer to the source Vertex */ struct ls_vertex *destination; /* Pointer to the destination Vertex */ @@ -419,13 +429,25 @@ DECLARE_RBTREE_UNIQ(vertices, struct ls_vertex, entry, vertex_cmp); macro_inline int edge_cmp(const struct ls_edge *edge1, const struct ls_edge *edge2) { - return numcmp(edge1->key, edge2->key); + if (edge1->key.family != edge2->key.family) + return numcmp(edge1->key.family, edge2->key.family); + + switch (edge1->key.family) { + case AF_INET: + return memcmp(&edge1->key.k.addr, &edge2->key.k.addr, 4); + case AF_INET6: + return memcmp(&edge1->key.k.addr6, &edge2->key.k.addr6, 16); + case AF_LOCAL: + return numcmp(edge1->key.k.link_id, edge2->key.k.link_id); + default: + return 0; + } } DECLARE_RBTREE_UNIQ(edges, struct ls_edge, entry, edge_cmp); /* * Prefix comparison are done to the host part so, 10.0.0.1/24 - * and 10.0.0.2/24 are considered come different + * and 10.0.0.2/24 are considered different */ macro_inline int subnet_cmp(const struct ls_subnet *a, const struct ls_subnet *b) @@ -622,7 +644,7 @@ extern void ls_edge_del_all(struct ls_ted *ted, struct ls_edge *edge); * @return Edge if found, NULL otherwise */ extern struct ls_edge *ls_find_edge_by_key(struct ls_ted *ted, - const uint64_t key); + const struct ls_edge_key key); /** * Find Edge in the Link State Data Base by the source (local IPv4 or IPv6 diff --git a/ospfd/ospf_te.c b/ospfd/ospf_te.c index 5f83e1c2c..3cf39e5fb 100644 --- a/ospfd/ospf_te.c +++ b/ospfd/ospf_te.c @@ -1665,12 +1665,13 @@ static struct ls_vertex *get_vertex(struct ls_ted *ted, struct ospf_lsa *lsa) static struct ls_edge *get_edge(struct ls_ted *ted, struct ls_node_id adv, struct in_addr link_id) { - uint64_t key; + struct ls_edge_key key; struct ls_edge *edge; struct ls_attributes *attr; /* Search Edge that corresponds to the Link ID */ - key = ((uint64_t)ntohl(link_id.s_addr)) & 0xffffffff; + key.family = AF_INET; + IPV4_ADDR_COPY(&key.k.addr, &link_id); edge = ls_find_edge_by_key(ted, key); /* Create new one if not exist */ @@ -2350,7 +2351,7 @@ static int ospf_te_delete_te(struct ls_ted *ted, struct ospf_lsa *lsa) struct ls_attributes *attr; struct tlv_header *tlvh; struct in_addr addr; - uint64_t key = 0; + struct ls_edge_key key = {.family = AF_UNSPEC}; uint16_t len, sum; uint8_t lsa_id; @@ -2366,12 +2367,13 @@ static int ospf_te_delete_te(struct ls_ted *ted, struct ospf_lsa *lsa) for (tlvh = TLV_DATA(tlvh); sum < len; tlvh = TLV_HDR_NEXT(tlvh)) { if (ntohs(tlvh->type) == TE_LINK_SUBTLV_LCLIF_IPADDR) { memcpy(&addr, TLV_DATA(tlvh), TE_LINK_SUBTLV_DEF_SIZE); - key = ((uint64_t)ntohl(addr.s_addr)) & 0xffffffff; + key.family = AF_INET; + IPV4_ADDR_COPY(&key.k.addr, &addr); break; } sum += TLV_SIZE(tlvh); } - if (key == 0) + if (key.family == AF_UNSPEC) return 0; /* Search Edge that corresponds to the Link ID */ @@ -2862,11 +2864,12 @@ static int ospf_te_delete_ext_link(struct ls_ted *ted, struct ospf_lsa *lsa) struct ls_edge *edge; struct ls_attributes *atr; struct ext_tlv_link *ext; - uint64_t key; + struct ls_edge_key key; /* Search for corresponding Edge from Link State Data Base */ ext = (struct ext_tlv_link *)TLV_HDR_TOP(lsa->data); - key = ((uint64_t)ntohl(ext->link_data.s_addr)) & 0xffffffff; + key.family = AF_INET; + IPV4_ADDR_COPY(&key.k.addr, &ext->link_data); edge = ls_find_edge_by_key(ted, key); /* Check if there is a corresponding Edge */ @@ -4298,6 +4301,7 @@ DEFUN (show_ip_ospf_mpls_te_db, struct ls_edge *edge; struct ls_subnet *subnet; uint64_t key; + struct ls_edge_key ekey; bool verbose = false; bool uj = use_json(argc, argv); json_object *json = NULL; @@ -4351,8 +4355,9 @@ DEFUN (show_ip_ospf_mpls_te_db, return CMD_WARNING_CONFIG_FAILED; } /* Get the Edge from the Link State Database */ - key = ((uint64_t)ntohl(ip_addr.s_addr)) & 0xffffffff; - edge = ls_find_edge_by_key(OspfMplsTE.ted, key); + ekey.family = AF_INET; + IPV4_ADDR_COPY(&ekey.k.addr, &ip_addr); + edge = ls_find_edge_by_key(OspfMplsTE.ted, ekey); if (!edge) { vty_out(vty, "No edge found for ID %pI4\n", &ip_addr); diff --git a/pathd/path_ted.c b/pathd/path_ted.c index fd5c342d8..df23f9312 100644 --- a/pathd/path_ted.c +++ b/pathd/path_ted.c @@ -206,7 +206,7 @@ uint32_t path_ted_query_type_f(struct ipaddr *local, struct ipaddr *remote) { uint32_t sid = MPLS_LABEL_NONE; struct ls_edge *edge; - uint64_t key; + struct ls_edge_key key; if (!path_ted_is_initialized()) return MPLS_LABEL_NONE; @@ -218,7 +218,8 @@ uint32_t path_ted_query_type_f(struct ipaddr *local, struct ipaddr *remote) case IPADDR_V4: /* We have local and remote ip */ /* so check all attributes in ted */ - key = ((uint64_t)ntohl(local->ip._v4_addr.s_addr)) & 0xffffffff; + key.family = AF_INET; + IPV4_ADDR_COPY(&key.k.addr, &local->ip._v4_addr); edge = ls_find_edge_by_key(ted_state_g.ted, key); if (edge) { if (edge->attributes->standard.remote.s_addr @@ -232,8 +233,8 @@ uint32_t path_ted_query_type_f(struct ipaddr *local, struct ipaddr *remote) } break; case IPADDR_V6: - key = (uint64_t)ntohl(local->ip._v6_addr.s6_addr32[2]) << 32 | - (uint64_t)ntohl(local->ip._v6_addr.s6_addr32[3]); + key.family = AF_INET6; + IPV6_ADDR_COPY(&key.k.addr6, &local->ip._v6_addr); edge = ls_find_edge_by_key(ted_state_g.ted, key); if (edge) { if ((0 == memcmp(&edge->attributes->standard.remote6, diff --git a/sharpd/sharp_vty.c b/sharpd/sharp_vty.c index 0d7ba3453..ca2212cd8 100644 --- a/sharpd/sharp_vty.c +++ b/sharpd/sharp_vty.c @@ -985,6 +985,7 @@ DEFUN (show_sharp_ted, struct ls_edge *edge; struct ls_subnet *subnet; uint64_t key; + struct ls_edge_key ekey; bool verbose = false; bool uj = use_json(argc, argv); json_object *json = NULL; @@ -1035,8 +1036,9 @@ DEFUN (show_sharp_ted, return CMD_WARNING_CONFIG_FAILED; } /* Get the Edge from the Link State Database */ - key = ((uint64_t)ip_addr.s_addr) & 0xffffffff; - edge = ls_find_edge_by_key(sg.ted, key); + ekey.family = AF_INET; + IPV4_ADDR_COPY(&ekey.k.addr, &ip_addr); + edge = ls_find_edge_by_key(sg.ted, ekey); if (!edge) { vty_out(vty, "No edge found for ID %pI4\n", &ip_addr); diff --git a/tests/topotests/cspf_topo1/reference/sharp-ted.json b/tests/topotests/cspf_topo1/reference/sharp-ted.json index da240e87a..359b655f0 100644 --- a/tests/topotests/cspf_topo1/reference/sharp-ted.json +++ b/tests/topotests/cspf_topo1/reference/sharp-ted.json @@ -53,7 +53,7 @@ ], "edges":[ { - "edge-id":65537, + "edge-id":"2001:db8:1::1:1", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0001", @@ -96,7 +96,7 @@ } }, { - "edge-id":65538, + "edge-id":"2001:db8:1::1:2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -139,7 +139,7 @@ } }, { - "edge-id":196610, + "edge-id":"2001:db8:3::3:2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -182,7 +182,7 @@ } }, { - "edge-id":196611, + "edge-id":"2001:db8:3::3:3", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0003", @@ -226,7 +226,7 @@ } }, { - "edge-id":196612, + "edge-id":"2001:db8:5::3:4", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0004", @@ -275,7 +275,7 @@ ] }, { - "edge-id":262147, + "edge-id":"2001:db8:5::4:3", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0003", @@ -318,7 +318,7 @@ } }, { - "edge-id":167772161, + "edge-id":"10.0.0.1", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0001", @@ -362,7 +362,7 @@ } }, { - "edge-id":167772162, + "edge-id":"10.0.0.2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -405,7 +405,7 @@ } }, { - "edge-id":167772417, + "edge-id":"10.0.1.1", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0001", @@ -448,7 +448,7 @@ } }, { - "edge-id":167772418, + "edge-id":"10.0.1.2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -491,7 +491,7 @@ } }, { - "edge-id":167772930, + "edge-id":"10.0.3.2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -534,7 +534,7 @@ } }, { - "edge-id":167772931, + "edge-id":"10.0.3.3", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0003", @@ -578,7 +578,7 @@ } }, { - "edge-id":167773186, + "edge-id":"10.0.4.2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -622,7 +622,7 @@ } }, { - "edge-id":167773188, + "edge-id":"10.0.4.4", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0004", diff --git a/tests/topotests/isis_te_topo1/reference/ted_step1.json b/tests/topotests/isis_te_topo1/reference/ted_step1.json index d7711b7e5..b70626e85 100644 --- a/tests/topotests/isis_te_topo1/reference/ted_step1.json +++ b/tests/topotests/isis_te_topo1/reference/ted_step1.json @@ -50,7 +50,7 @@ ], "edges":[ { - "edge-id":65537, + "edge-id":"2001:db8:1::1:1", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0001", @@ -91,7 +91,7 @@ } }, { - "edge-id":65538, + "edge-id":"2001:db8:1::1:2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -132,7 +132,7 @@ } }, { - "edge-id":196610, + "edge-id":"2001:db8:3::3:2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -173,7 +173,7 @@ } }, { - "edge-id":196611, + "edge-id":"2001:db8:3::3:3", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0003", @@ -215,7 +215,7 @@ } }, { - "edge-id":196612, + "edge-id":"2001:db8:5::3:4", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0004", @@ -263,7 +263,7 @@ ] }, { - "edge-id":262147, + "edge-id":"2001:db8:5::4:3", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0003", @@ -306,7 +306,7 @@ } }, { - "edge-id":167772161, + "edge-id":"10.0.0.1", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0001", @@ -350,7 +350,7 @@ } }, { - "edge-id":167772162, + "edge-id":"10.0.0.2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -391,7 +391,7 @@ } }, { - "edge-id":167772417, + "edge-id":"10.0.1.1", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0001", @@ -432,7 +432,7 @@ } }, { - "edge-id":167772418, + "edge-id":"10.0.1.2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -473,7 +473,7 @@ } }, { - "edge-id":167772930, + "edge-id":"10.0.3.2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -514,7 +514,7 @@ } }, { - "edge-id":167772931, + "edge-id":"10.0.3.3", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0003", @@ -556,7 +556,7 @@ } }, { - "edge-id":167773186, + "edge-id":"10.0.4.2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -600,7 +600,7 @@ } }, { - "edge-id":167773188, + "edge-id":"10.0.4.4", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0004", diff --git a/tests/topotests/isis_te_topo1/reference/ted_step10.json b/tests/topotests/isis_te_topo1/reference/ted_step10.json index 7d017b343..f029e5aab 100644 --- a/tests/topotests/isis_te_topo1/reference/ted_step10.json +++ b/tests/topotests/isis_te_topo1/reference/ted_step10.json @@ -50,7 +50,7 @@ ], "edges":[ { - "edge-id":1, + "edge-id":"2001:db8::1", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0001", @@ -108,7 +108,7 @@ } }, { - "edge-id":2, + "edge-id":"2001:db8::2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -148,7 +148,7 @@ } }, { - "edge-id":65537, + "edge-id":"2001:db8:1::1:1", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0001", @@ -189,7 +189,7 @@ } }, { - "edge-id":65538, + "edge-id":"2001:db8:1::1:2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -230,7 +230,7 @@ } }, { - "edge-id":196610, + "edge-id":"2001:db8:3::3:2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -271,7 +271,7 @@ } }, { - "edge-id":196611, + "edge-id":"2001:db8:3::3:3", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0003", @@ -313,7 +313,7 @@ } }, { - "edge-id":196612, + "edge-id":"2001:db8:5::3:4", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0004", @@ -361,7 +361,7 @@ ] }, { - "edge-id":262147, + "edge-id":"2001:db8:5::4:3", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0003", @@ -404,7 +404,7 @@ } }, { - "edge-id":167772161, + "edge-id":"10.0.0.1", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0001", @@ -462,7 +462,7 @@ } }, { - "edge-id":167772162, + "edge-id":"10.0.0.2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -503,7 +503,7 @@ } }, { - "edge-id":167772417, + "edge-id":"10.0.1.1", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0001", @@ -544,7 +544,7 @@ } }, { - "edge-id":167772418, + "edge-id":"10.0.1.2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -585,7 +585,7 @@ } }, { - "edge-id":167772930, + "edge-id":"10.0.3.2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -626,7 +626,7 @@ } }, { - "edge-id":167772931, + "edge-id":"10.0.3.3", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0003", @@ -668,7 +668,7 @@ } }, { - "edge-id":167773186, + "edge-id":"10.0.4.2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -711,7 +711,7 @@ } }, { - "edge-id":167773188, + "edge-id":"10.0.4.4", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0004", diff --git a/tests/topotests/isis_te_topo1/reference/ted_step2.json b/tests/topotests/isis_te_topo1/reference/ted_step2.json index 7b2074b69..aa2bafb15 100644 --- a/tests/topotests/isis_te_topo1/reference/ted_step2.json +++ b/tests/topotests/isis_te_topo1/reference/ted_step2.json @@ -50,7 +50,7 @@ ], "edges":[ { - "edge-id":196610, + "edge-id":"2001:db8:3::3:2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -91,7 +91,7 @@ } }, { - "edge-id":196611, + "edge-id":"2001:db8:3::3:3", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0003", @@ -133,7 +133,7 @@ } }, { - "edge-id":196612, + "edge-id":"2001:db8:5::3:4", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0004", @@ -181,7 +181,7 @@ ] }, { - "edge-id":262147, + "edge-id":"2001:db8:5::4:3", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0003", @@ -224,7 +224,7 @@ } }, { - "edge-id":167772161, + "edge-id":"10.0.0.1", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0001", @@ -268,7 +268,7 @@ } }, { - "edge-id":167772162, + "edge-id":"10.0.0.2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -309,7 +309,7 @@ } }, { - "edge-id":167772930, + "edge-id":"10.0.3.2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -350,7 +350,7 @@ } }, { - "edge-id":167772931, + "edge-id":"10.0.3.3", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0003", @@ -392,7 +392,7 @@ } }, { - "edge-id":167773186, + "edge-id":"10.0.4.2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -436,7 +436,7 @@ } }, { - "edge-id":167773188, + "edge-id":"10.0.4.4", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0004", diff --git a/tests/topotests/isis_te_topo1/reference/ted_step3.json b/tests/topotests/isis_te_topo1/reference/ted_step3.json index 528138477..de6d108bb 100644 --- a/tests/topotests/isis_te_topo1/reference/ted_step3.json +++ b/tests/topotests/isis_te_topo1/reference/ted_step3.json @@ -50,7 +50,7 @@ ], "edges":[ { - "edge-id":1, + "edge-id":"2001:db8::1", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0001", @@ -94,7 +94,7 @@ } }, { - "edge-id":2, + "edge-id":"2001:db8::2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -134,7 +134,7 @@ } }, { - "edge-id":196610, + "edge-id":"2001:db8:3::3:2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -175,7 +175,7 @@ } }, { - "edge-id":196611, + "edge-id":"2001:db8:3::3:3", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0003", @@ -217,7 +217,7 @@ } }, { - "edge-id":196612, + "edge-id":"2001:db8:5::3:4", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0004", @@ -265,7 +265,7 @@ ] }, { - "edge-id":262147, + "edge-id":"2001:db8:5::4:3", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0003", @@ -308,7 +308,7 @@ } }, { - "edge-id":167772161, + "edge-id":"10.0.0.1", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0001", @@ -352,7 +352,7 @@ } }, { - "edge-id":167772162, + "edge-id":"10.0.0.2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -393,7 +393,7 @@ } }, { - "edge-id":167772930, + "edge-id":"10.0.3.2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -434,7 +434,7 @@ } }, { - "edge-id":167772931, + "edge-id":"10.0.3.3", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0003", @@ -476,7 +476,7 @@ } }, { - "edge-id":167773186, + "edge-id":"10.0.4.2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -520,7 +520,7 @@ } }, { - "edge-id":167773188, + "edge-id":"10.0.4.4", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0004", diff --git a/tests/topotests/isis_te_topo1/reference/ted_step4.json b/tests/topotests/isis_te_topo1/reference/ted_step4.json index 528138477..de6d108bb 100644 --- a/tests/topotests/isis_te_topo1/reference/ted_step4.json +++ b/tests/topotests/isis_te_topo1/reference/ted_step4.json @@ -50,7 +50,7 @@ ], "edges":[ { - "edge-id":1, + "edge-id":"2001:db8::1", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0001", @@ -94,7 +94,7 @@ } }, { - "edge-id":2, + "edge-id":"2001:db8::2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -134,7 +134,7 @@ } }, { - "edge-id":196610, + "edge-id":"2001:db8:3::3:2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -175,7 +175,7 @@ } }, { - "edge-id":196611, + "edge-id":"2001:db8:3::3:3", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0003", @@ -217,7 +217,7 @@ } }, { - "edge-id":196612, + "edge-id":"2001:db8:5::3:4", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0004", @@ -265,7 +265,7 @@ ] }, { - "edge-id":262147, + "edge-id":"2001:db8:5::4:3", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0003", @@ -308,7 +308,7 @@ } }, { - "edge-id":167772161, + "edge-id":"10.0.0.1", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0001", @@ -352,7 +352,7 @@ } }, { - "edge-id":167772162, + "edge-id":"10.0.0.2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -393,7 +393,7 @@ } }, { - "edge-id":167772930, + "edge-id":"10.0.3.2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -434,7 +434,7 @@ } }, { - "edge-id":167772931, + "edge-id":"10.0.3.3", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0003", @@ -476,7 +476,7 @@ } }, { - "edge-id":167773186, + "edge-id":"10.0.4.2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -520,7 +520,7 @@ } }, { - "edge-id":167773188, + "edge-id":"10.0.4.4", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0004", diff --git a/tests/topotests/isis_te_topo1/reference/ted_step5.json b/tests/topotests/isis_te_topo1/reference/ted_step5.json index 72e441d18..7daee9929 100644 --- a/tests/topotests/isis_te_topo1/reference/ted_step5.json +++ b/tests/topotests/isis_te_topo1/reference/ted_step5.json @@ -50,7 +50,7 @@ ], "edges":[ { - "edge-id":1, + "edge-id":"2001:db8::1", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0001", @@ -94,7 +94,7 @@ } }, { - "edge-id":2, + "edge-id":"2001:db8::2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -134,7 +134,7 @@ } }, { - "edge-id":65537, + "edge-id":"2001:db8:1::1:1", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0001", @@ -175,7 +175,7 @@ } }, { - "edge-id":65538, + "edge-id":"2001:db8:1::1:2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -216,7 +216,7 @@ } }, { - "edge-id":196610, + "edge-id":"2001:db8:3::3:2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -257,7 +257,7 @@ } }, { - "edge-id":196611, + "edge-id":"2001:db8:3::3:3", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0003", @@ -299,7 +299,7 @@ } }, { - "edge-id":196612, + "edge-id":"2001:db8:5::3:4", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0004", @@ -347,7 +347,7 @@ ] }, { - "edge-id":262147, + "edge-id":"2001:db8:5::4:3", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0003", @@ -390,7 +390,7 @@ } }, { - "edge-id":167772161, + "edge-id":"10.0.0.1", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0001", @@ -434,7 +434,7 @@ } }, { - "edge-id":167772162, + "edge-id":"10.0.0.2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -475,7 +475,7 @@ } }, { - "edge-id":167772417, + "edge-id":"10.0.1.1", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0001", @@ -516,7 +516,7 @@ } }, { - "edge-id":167772418, + "edge-id":"10.0.1.2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -557,7 +557,7 @@ } }, { - "edge-id":167772930, + "edge-id":"10.0.3.2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -598,7 +598,7 @@ } }, { - "edge-id":167772931, + "edge-id":"10.0.3.3", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0003", @@ -640,7 +640,7 @@ } }, { - "edge-id":167773186, + "edge-id":"10.0.4.2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -684,7 +684,7 @@ } }, { - "edge-id":167773188, + "edge-id":"10.0.4.4", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0004", diff --git a/tests/topotests/isis_te_topo1/reference/ted_step6.json b/tests/topotests/isis_te_topo1/reference/ted_step6.json index a5f50c3eb..289eb1ebc 100644 --- a/tests/topotests/isis_te_topo1/reference/ted_step6.json +++ b/tests/topotests/isis_te_topo1/reference/ted_step6.json @@ -50,7 +50,7 @@ ], "edges":[ { - "edge-id":1, + "edge-id":"2001:db8::1", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0001", @@ -94,7 +94,7 @@ } }, { - "edge-id":2, + "edge-id":"2001:db8::2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -134,7 +134,7 @@ } }, { - "edge-id":65537, + "edge-id":"2001:db8:1::1:1", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0001", @@ -175,7 +175,7 @@ } }, { - "edge-id":65538, + "edge-id":"2001:db8:1::1:2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -216,7 +216,7 @@ } }, { - "edge-id":196610, + "edge-id":"2001:db8:3::3:2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -257,7 +257,7 @@ } }, { - "edge-id":196611, + "edge-id":"2001:db8:3::3:3", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0003", @@ -299,7 +299,7 @@ } }, { - "edge-id":196612, + "edge-id":"2001:db8:5::3:4", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0004", @@ -347,7 +347,7 @@ ] }, { - "edge-id":262147, + "edge-id":"2001:db8:5::4:3", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0003", @@ -390,7 +390,7 @@ } }, { - "edge-id":167772161, + "edge-id":"10.0.0.1", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0001", @@ -434,7 +434,7 @@ } }, { - "edge-id":167772162, + "edge-id":"10.0.0.2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -475,7 +475,7 @@ } }, { - "edge-id":167772417, + "edge-id":"10.0.1.1", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0001", @@ -516,7 +516,7 @@ } }, { - "edge-id":167772418, + "edge-id":"10.0.1.2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -557,7 +557,7 @@ } }, { - "edge-id":167772930, + "edge-id":"10.0.3.2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -598,7 +598,7 @@ } }, { - "edge-id":167772931, + "edge-id":"10.0.3.3", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0003", @@ -640,7 +640,7 @@ } }, { - "edge-id":167773186, + "edge-id":"10.0.4.2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -683,7 +683,7 @@ } }, { - "edge-id":167773188, + "edge-id":"10.0.4.4", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0004", diff --git a/tests/topotests/isis_te_topo1/reference/ted_step7.json b/tests/topotests/isis_te_topo1/reference/ted_step7.json index 447febce4..18eb42fd3 100644 --- a/tests/topotests/isis_te_topo1/reference/ted_step7.json +++ b/tests/topotests/isis_te_topo1/reference/ted_step7.json @@ -50,7 +50,7 @@ ], "edges":[ { - "edge-id":1, + "edge-id":"2001:db8::1", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0001", @@ -109,7 +109,7 @@ } }, { - "edge-id":2, + "edge-id":"2001:db8::2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -149,7 +149,7 @@ } }, { - "edge-id":65537, + "edge-id":"2001:db8:1::1:1", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0001", @@ -190,7 +190,7 @@ } }, { - "edge-id":65538, + "edge-id":"2001:db8:1::1:2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -231,7 +231,7 @@ } }, { - "edge-id":196610, + "edge-id":"2001:db8:3::3:2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -272,7 +272,7 @@ } }, { - "edge-id":196611, + "edge-id":"2001:db8:3::3:3", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0003", @@ -314,7 +314,7 @@ } }, { - "edge-id":196612, + "edge-id":"2001:db8:5::3:4", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0004", @@ -362,7 +362,7 @@ ] }, { - "edge-id":262147, + "edge-id":"2001:db8:5::4:3", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0003", @@ -405,7 +405,7 @@ } }, { - "edge-id":167772161, + "edge-id":"10.0.0.1", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0001", @@ -464,7 +464,7 @@ } }, { - "edge-id":167772162, + "edge-id":"10.0.0.2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -505,7 +505,7 @@ } }, { - "edge-id":167772417, + "edge-id":"10.0.1.1", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0001", @@ -546,7 +546,7 @@ } }, { - "edge-id":167772418, + "edge-id":"10.0.1.2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -587,7 +587,7 @@ } }, { - "edge-id":167772930, + "edge-id":"10.0.3.2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -628,7 +628,7 @@ } }, { - "edge-id":167772931, + "edge-id":"10.0.3.3", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0003", @@ -670,7 +670,7 @@ } }, { - "edge-id":167773186, + "edge-id":"10.0.4.2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -713,7 +713,7 @@ } }, { - "edge-id":167773188, + "edge-id":"10.0.4.4", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0004", diff --git a/tests/topotests/isis_te_topo1/reference/ted_step8.json b/tests/topotests/isis_te_topo1/reference/ted_step8.json index 510e034eb..ede36cf93 100644 --- a/tests/topotests/isis_te_topo1/reference/ted_step8.json +++ b/tests/topotests/isis_te_topo1/reference/ted_step8.json @@ -50,7 +50,7 @@ ], "edges":[ { - "edge-id":1, + "edge-id":"2001:db8::1", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0001", @@ -109,7 +109,7 @@ } }, { - "edge-id":2, + "edge-id":"2001:db8::2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -149,7 +149,7 @@ } }, { - "edge-id":65537, + "edge-id":"2001:db8:1::1:1", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0001", @@ -190,7 +190,7 @@ } }, { - "edge-id":65538, + "edge-id":"2001:db8:1::1:2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -231,7 +231,7 @@ } }, { - "edge-id":196610, + "edge-id":"2001:db8:3::3:2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -272,7 +272,7 @@ } }, { - "edge-id":196611, + "edge-id":"2001:db8:3::3:3", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0003", @@ -314,7 +314,7 @@ } }, { - "edge-id":196612, + "edge-id":"2001:db8:5::3:4", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0004", @@ -362,7 +362,7 @@ ] }, { - "edge-id":262147, + "edge-id":"2001:db8:5::4:3", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0003", @@ -405,7 +405,7 @@ } }, { - "edge-id":167772161, + "edge-id":"10.0.0.1", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0001", @@ -464,7 +464,7 @@ } }, { - "edge-id":167772162, + "edge-id":"10.0.0.2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -505,7 +505,7 @@ } }, { - "edge-id":167772417, + "edge-id":"10.0.1.1", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0001", @@ -546,7 +546,7 @@ } }, { - "edge-id":167772418, + "edge-id":"10.0.1.2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -587,7 +587,7 @@ } }, { - "edge-id":167772930, + "edge-id":"10.0.3.2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -628,7 +628,7 @@ } }, { - "edge-id":167772931, + "edge-id":"10.0.3.3", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0003", @@ -670,7 +670,7 @@ } }, { - "edge-id":167773186, + "edge-id":"10.0.4.2", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0002", @@ -713,7 +713,7 @@ } }, { - "edge-id":167773188, + "edge-id":"10.0.4.4", "status":"Sync", "origin":"ISIS_L2", "advertised-router":"0000.0000.0004", diff --git a/tests/topotests/ospf_te_topo1/reference/ted_step1.json b/tests/topotests/ospf_te_topo1/reference/ted_step1.json index 18aee4ffa..8b2413a89 100644 --- a/tests/topotests/ospf_te_topo1/reference/ted_step1.json +++ b/tests/topotests/ospf_te_topo1/reference/ted_step1.json @@ -57,7 +57,7 @@ ], "edges":[ { - "edge-id":167772161, + "edge-id":"10.0.0.1", "status":"Sync", "origin":"OSPFv2", "advertised-router":"10.0.255.1", @@ -101,7 +101,7 @@ } }, { - "edge-id":167772162, + "edge-id":"10.0.0.2", "status":"Sync", "origin":"OSPFv2", "advertised-router":"10.0.255.2", @@ -142,7 +142,7 @@ } }, { - "edge-id":167772417, + "edge-id":"10.0.1.1", "status":"Sync", "origin":"OSPFv2", "advertised-router":"10.0.255.1", @@ -183,7 +183,7 @@ } }, { - "edge-id":167772418, + "edge-id":"10.0.1.2", "status":"Sync", "origin":"OSPFv2", "advertised-router":"10.0.255.2", @@ -224,7 +224,7 @@ } }, { - "edge-id":167772929, + "edge-id":"10.0.3.1", "status":"Sync", "origin":"OSPFv2", "advertised-router":"10.0.255.3", @@ -266,7 +266,7 @@ } }, { - "edge-id":167772930, + "edge-id":"10.0.3.2", "status":"Sync", "origin":"OSPFv2", "advertised-router":"10.0.255.2", @@ -307,7 +307,7 @@ } }, { - "edge-id":167773185, + "edge-id":"10.0.4.1", "status":"Sync", "origin":"OSPFv2", "advertised-router":"10.0.255.4", @@ -360,7 +360,7 @@ ] }, { - "edge-id":167773186, + "edge-id":"10.0.4.2", "status":"Sync", "origin":"OSPFv2", "advertised-router":"10.0.255.2", @@ -404,7 +404,7 @@ } }, { - "edge-id":167773441, + "edge-id":"10.0.5.1", "status":"Sync", "origin":"OSPFv2", "advertised-router":"10.0.255.3", diff --git a/tests/topotests/ospf_te_topo1/reference/ted_step2.json b/tests/topotests/ospf_te_topo1/reference/ted_step2.json index 1ed727256..625b57d15 100644 --- a/tests/topotests/ospf_te_topo1/reference/ted_step2.json +++ b/tests/topotests/ospf_te_topo1/reference/ted_step2.json @@ -57,7 +57,7 @@ ], "edges":[ { - "edge-id":167772161, + "edge-id":"10.0.0.1", "status":"Sync", "origin":"OSPFv2", "advertised-router":"10.0.255.1", @@ -101,7 +101,7 @@ } }, { - "edge-id":167772162, + "edge-id":"10.0.0.2", "status":"Sync", "origin":"OSPFv2", "advertised-router":"10.0.255.2", @@ -142,7 +142,7 @@ } }, { - "edge-id":167772929, + "edge-id":"10.0.3.1", "status":"Sync", "origin":"OSPFv2", "advertised-router":"10.0.255.3", @@ -184,7 +184,7 @@ } }, { - "edge-id":167772930, + "edge-id":"10.0.3.2", "status":"Sync", "origin":"OSPFv2", "advertised-router":"10.0.255.2", @@ -225,7 +225,7 @@ } }, { - "edge-id":167773185, + "edge-id":"10.0.4.1", "status":"Sync", "origin":"OSPFv2", "advertised-router":"10.0.255.4", @@ -278,7 +278,7 @@ ] }, { - "edge-id":167773186, + "edge-id":"10.0.4.2", "status":"Sync", "origin":"OSPFv2", "advertised-router":"10.0.255.2", @@ -322,7 +322,7 @@ } }, { - "edge-id":167773441, + "edge-id":"10.0.5.1", "status":"Sync", "origin":"OSPFv2", "advertised-router":"10.0.255.3", diff --git a/tests/topotests/ospf_te_topo1/reference/ted_step3.json b/tests/topotests/ospf_te_topo1/reference/ted_step3.json index 0e79670c7..4cfec0f60 100644 --- a/tests/topotests/ospf_te_topo1/reference/ted_step3.json +++ b/tests/topotests/ospf_te_topo1/reference/ted_step3.json @@ -49,7 +49,7 @@ ], "edges":[ { - "edge-id":167772161, + "edge-id":"10.0.0.1", "status":"Sync", "origin":"OSPFv2", "advertised-router":"10.0.255.1", @@ -93,7 +93,7 @@ } }, { - "edge-id":167772162, + "edge-id":"10.0.0.2", "status":"Sync", "origin":"OSPFv2", "advertised-router":"10.0.255.2", @@ -134,7 +134,7 @@ } }, { - "edge-id":167772929, + "edge-id":"10.0.3.1", "status":"Sync", "origin":"OSPFv2", "advertised-router":"10.0.255.3", @@ -176,7 +176,7 @@ } }, { - "edge-id":167772930, + "edge-id":"10.0.3.2", "status":"Sync", "origin":"OSPFv2", "advertised-router":"10.0.255.2", @@ -217,7 +217,7 @@ } }, { - "edge-id":167773185, + "edge-id":"10.0.4.1", "status":"Sync", "origin":"OSPFv2", "advertised-router":"10.0.255.4", @@ -270,7 +270,7 @@ ] }, { - "edge-id":167773186, + "edge-id":"10.0.4.2", "status":"Sync", "origin":"OSPFv2", "advertised-router":"10.0.255.2", diff --git a/tests/topotests/ospf_te_topo1/reference/ted_step4.json b/tests/topotests/ospf_te_topo1/reference/ted_step4.json index 860dcb3f2..e8e24d980 100644 --- a/tests/topotests/ospf_te_topo1/reference/ted_step4.json +++ b/tests/topotests/ospf_te_topo1/reference/ted_step4.json @@ -72,7 +72,7 @@ ], "edges":[ { - "edge-id":167772161, + "edge-id":"10.0.0.1", "status":"Sync", "origin":"OSPFv2", "advertised-router":"10.0.255.1", @@ -128,7 +128,7 @@ ] }, { - "edge-id":167772162, + "edge-id":"10.0.0.2", "status":"Sync", "origin":"OSPFv2", "advertised-router":"10.0.255.2", @@ -181,7 +181,7 @@ ] }, { - "edge-id":167772929, + "edge-id":"10.0.3.1", "status":"Sync", "origin":"OSPFv2", "advertised-router":"10.0.255.3", @@ -223,7 +223,7 @@ } }, { - "edge-id":167772930, + "edge-id":"10.0.3.2", "status":"Sync", "origin":"OSPFv2", "advertised-router":"10.0.255.2", @@ -276,7 +276,7 @@ ] }, { - "edge-id":167773185, + "edge-id":"10.0.4.1", "status":"Sync", "origin":"OSPFv2", "advertised-router":"10.0.255.4", @@ -329,7 +329,7 @@ ] }, { - "edge-id":167773186, + "edge-id":"10.0.4.2", "status":"Sync", "origin":"OSPFv2", "advertised-router":"10.0.255.2", diff --git a/tests/topotests/ospf_te_topo1/reference/ted_step5.json b/tests/topotests/ospf_te_topo1/reference/ted_step5.json index 615a691c4..4713cc011 100644 --- a/tests/topotests/ospf_te_topo1/reference/ted_step5.json +++ b/tests/topotests/ospf_te_topo1/reference/ted_step5.json @@ -72,7 +72,7 @@ ], "edges":[ { - "edge-id":167772161, + "edge-id":"10.0.0.1", "status":"Sync", "origin":"OSPFv2", "advertised-router":"10.0.255.1", @@ -128,7 +128,7 @@ ] }, { - "edge-id":167772162, + "edge-id":"10.0.0.2", "status":"Sync", "origin":"OSPFv2", "advertised-router":"10.0.255.2", @@ -181,7 +181,7 @@ ] }, { - "edge-id":167772417, + "edge-id":"10.0.1.1", "status":"Sync", "origin":"OSPFv2", "advertised-router":"10.0.255.1", @@ -234,7 +234,7 @@ ] }, { - "edge-id":167772418, + "edge-id":"10.0.1.2", "status":"Sync", "origin":"OSPFv2", "advertised-router":"10.0.255.2", @@ -287,7 +287,7 @@ ] }, { - "edge-id":167772929, + "edge-id":"10.0.3.1", "status":"Sync", "origin":"OSPFv2", "advertised-router":"10.0.255.3", @@ -329,7 +329,7 @@ } }, { - "edge-id":167772930, + "edge-id":"10.0.3.2", "status":"Sync", "origin":"OSPFv2", "advertised-router":"10.0.255.2", @@ -382,7 +382,7 @@ ] }, { - "edge-id":167773185, + "edge-id":"10.0.4.1", "status":"Sync", "origin":"OSPFv2", "advertised-router":"10.0.255.4", @@ -435,7 +435,7 @@ ] }, { - "edge-id":167773186, + "edge-id":"10.0.4.2", "status":"Sync", "origin":"OSPFv2", "advertised-router":"10.0.255.2", diff --git a/tests/topotests/ospf_te_topo1/reference/ted_step6.json b/tests/topotests/ospf_te_topo1/reference/ted_step6.json index 3b84d2580..aaac07b05 100644 --- a/tests/topotests/ospf_te_topo1/reference/ted_step6.json +++ b/tests/topotests/ospf_te_topo1/reference/ted_step6.json @@ -72,7 +72,7 @@ ], "edges":[ { - "edge-id":167772161, + "edge-id":"10.0.0.1", "status":"Sync", "origin":"OSPFv2", "advertised-router":"10.0.255.1", @@ -128,7 +128,7 @@ ] }, { - "edge-id":167772162, + "edge-id":"10.0.0.2", "status":"Sync", "origin":"OSPFv2", "advertised-router":"10.0.255.2", @@ -181,7 +181,7 @@ ] }, { - "edge-id":167772417, + "edge-id":"10.0.1.1", "status":"Sync", "origin":"OSPFv2", "advertised-router":"10.0.255.1", @@ -234,7 +234,7 @@ ] }, { - "edge-id":167772418, + "edge-id":"10.0.1.2", "status":"Sync", "origin":"OSPFv2", "advertised-router":"10.0.255.2", @@ -287,7 +287,7 @@ ] }, { - "edge-id":167772929, + "edge-id":"10.0.3.1", "status":"Sync", "origin":"OSPFv2", "advertised-router":"10.0.255.3", @@ -329,7 +329,7 @@ } }, { - "edge-id":167772930, + "edge-id":"10.0.3.2", "status":"Sync", "origin":"OSPFv2", "advertised-router":"10.0.255.2", @@ -382,7 +382,7 @@ ] }, { - "edge-id":167773185, + "edge-id":"10.0.4.1", "status":"Sync", "origin":"OSPFv2", "advertised-router":"10.0.255.4", @@ -437,7 +437,7 @@ ] }, { - "edge-id":167773186, + "edge-id":"10.0.4.2", "status":"Sync", "origin":"OSPFv2", "advertised-router":"10.0.255.2", diff --git a/tests/topotests/ospf_te_topo1/reference/ted_step7.json b/tests/topotests/ospf_te_topo1/reference/ted_step7.json index 83f8a1d5d..56ed1f176 100644 --- a/tests/topotests/ospf_te_topo1/reference/ted_step7.json +++ b/tests/topotests/ospf_te_topo1/reference/ted_step7.json @@ -53,7 +53,7 @@ ], "edges":[ { - "edge-id":167772161, + "edge-id":"10.0.0.1", "status":"Sync", "origin":"OSPFv2", "advertised-router":"10.0.255.1", @@ -109,7 +109,7 @@ ] }, { - "edge-id":167772162, + "edge-id":"10.0.0.2", "status":"Sync", "origin":"OSPFv2", "advertised-router":"10.0.255.2", @@ -162,7 +162,7 @@ ] }, { - "edge-id":167772417, + "edge-id":"10.0.1.1", "status":"Sync", "origin":"OSPFv2", "advertised-router":"10.0.255.1", @@ -215,7 +215,7 @@ ] }, { - "edge-id":167772418, + "edge-id":"10.0.1.2", "status":"Sync", "origin":"OSPFv2", "advertised-router":"10.0.255.2", @@ -268,7 +268,7 @@ ] }, { - "edge-id":167772929, + "edge-id":"10.0.3.1", "status":"Sync", "origin":"OSPFv2", "advertised-router":"10.0.255.3", @@ -310,7 +310,7 @@ } }, { - "edge-id":167772930, + "edge-id":"10.0.3.2", "status":"Sync", "origin":"OSPFv2", "advertised-router":"10.0.255.2", |