diff options
| author | Olivier Dugeon <olivier.dugeon@orange.com> | 2023-03-01 19:00:28 +0100 |
|---|---|---|
| committer | Olivier Dugeon <olivier.dugeon@orange.com> | 2023-04-07 16:40:26 +0200 |
| commit | f2dcaf355542883f776de7dd235f22287ff926c7 (patch) | |
| tree | 83518b7f9270976bbdc27b69f712380ebf75144b /sharpd | |
| parent | 7f2742b657134ed631c01fc918755320fa52c393 (diff) | |
sharpd: Update TE to new Link State Edge key
Following the modification of the edge key in link state database
this patch updates the sharp_vty.c file to replace the old uint64_t edge key by
the new ls_edge_key structure when searching for an edge.
Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
Diffstat (limited to 'sharpd')
| -rw-r--r-- | sharpd/sharp_vty.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sharpd/sharp_vty.c b/sharpd/sharp_vty.c index 77b562d6a6..5e70c57443 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); |
