mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-04-28 17:01:51 +00:00
pathd: Update TE to new Link State Edge key
Following the modification of the edge key in link state database this patch updates the path_ted.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>
This commit is contained in:
parent
7564fcb8f9
commit
7f2742b657
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user