diff options
author | Olivier Dugeon <olivier.dugeon@orange.com> | 2022-09-27 11:24:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-27 11:24:53 +0200 |
commit | 031561497c01a4abdab455c0b5f582c958e7a9c6 (patch) | |
tree | 3b6e2419358677c2da5927968e2c0214092a6c7a /pathd/path_ted.c | |
parent | Merge pull request #12009 from AbhishekNR/json_last-member-query-count (diff) | |
parent | pathd: nai adjacency fix query type f for IPV6 (diff) | |
download | frr-031561497c01a4abdab455c0b5f582c958e7a9c6.tar.xz frr-031561497c01a4abdab455c0b5f582c958e7a9c6.zip |
Merge pull request #11910 from fdumontet6WIND/NAI_Adj
pathd: nai adjacency fix query type f for IPV6
Diffstat (limited to 'pathd/path_ted.c')
-rw-r--r-- | pathd/path_ted.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/pathd/path_ted.c b/pathd/path_ted.c index 7afa1468a..aaa8317d3 100644 --- a/pathd/path_ted.c +++ b/pathd/path_ted.c @@ -243,16 +243,16 @@ uint32_t path_ted_query_type_f(struct ipaddr *local, struct ipaddr *remote) } break; case IPADDR_V6: - key = (uint64_t)(local->ip._v6_addr.s6_addr32[0] & 0xffffffff) - | ((uint64_t)local->ip._v6_addr.s6_addr32[1] << 32); + key = (uint64_t)ntohl(local->ip._v6_addr.s6_addr32[2]) << 32 | + (uint64_t)ntohl(local->ip._v6_addr.s6_addr32[3]); edge = ls_find_edge_by_key(ted_state_g.ted, key); if (edge) { - if ((memcmp(&edge->attributes->standard.remote6, - &remote->ip._v6_addr, - sizeof(remote->ip._v6_addr)) - && CHECK_FLAG(edge->attributes->flags, - LS_ATTR_ADJ_SID))) { - sid = edge->attributes->adj_sid[0] + if ((0 == memcmp(&edge->attributes->standard.remote6, + &remote->ip._v6_addr, + sizeof(remote->ip._v6_addr)) && + CHECK_FLAG(edge->attributes->flags, + LS_ATTR_ADJ_SID6))) { + sid = edge->attributes->adj_sid[ADJ_PRI_IPV6] .sid; /* from primary */ break; } |