summaryrefslogtreecommitdiffstats
path: root/sharpd
diff options
context:
space:
mode:
authorPhilippe Guibert <philippe.guibert@6wind.com>2023-04-20 18:33:21 +0200
committerGitHub <noreply@github.com>2023-04-20 18:33:21 +0200
commit7b343a9ed5381d6e66cb68a6aa396d2194de7444 (patch)
treece55d7f53e9f05634719b44217cf132bb4ebc952 /sharpd
parentMerge pull request #13329 from Pdoijode/pdoijode/bgp-attr-crash-fix (diff)
parenttests: Update TE topotests to follow new Edge Key (diff)
downloadfrr-7b343a9ed5381d6e66cb68a6aa396d2194de7444.tar.xz
frr-7b343a9ed5381d6e66cb68a6aa396d2194de7444.zip
Merge pull request #12933 from Orange-OpenSource/link_state
lib: Update edge key in link state database
Diffstat (limited to 'sharpd')
-rw-r--r--sharpd/sharp_vty.c6
1 files changed, 4 insertions, 2 deletions
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);