]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Nest: Fix handling of 64-bit rte_src.private_id
authorOndrej Zajicek <santiago@crfreenet.org>
Tue, 17 Dec 2024 08:00:42 +0000 (09:00 +0100)
committerOndrej Zajicek <santiago@crfreenet.org>
Tue, 17 Dec 2024 08:00:42 +0000 (09:00 +0100)
The commit 21213be523baa7f2cbf0feaa617f265c55e9b17a expanded private_id
in route source to u64, but forgot to modify function arguments, so it
was still cropped at 32-bit, which may cause some collisions for L3VPN.
This patch fixes that.

nest/route.h
nest/rt-attr.c

index be3d759e770975c1822b54505d7cd962c24f8f1b..3ff61182489408610f9de74d613532ba4bb10281 100644 (file)
@@ -593,8 +593,8 @@ typedef struct ea_list {
 #define EALF_BISECT 2                  /* Use interval bisection for searching */
 #define EALF_CACHED 4                  /* Attributes belonging to cached rta */
 
-struct rte_src *rt_find_source(struct proto *p, u32 id);
-struct rte_src *rt_get_source(struct proto *p, u32 id);
+struct rte_src *rt_find_source(struct proto *p, u64 id);
+struct rte_src *rt_get_source(struct proto *p, u64 id);
 static inline void rt_lock_source(struct rte_src *src) { src->uc++; }
 static inline void rt_unlock_source(struct rte_src *src) { src->uc--; }
 void rt_prune_sources(void);
index a567720edad93ce02b14e71a4d69f506c23212d9..7c49af17474607c3d0fa9dd180aa6369b8ca6eaf 100644 (file)
@@ -124,13 +124,13 @@ rte_src_init(void)
 HASH_DEFINE_REHASH_FN(RSH, struct rte_src)
 
 struct rte_src *
-rt_find_source(struct proto *p, u32 id)
+rt_find_source(struct proto *p, u64 id)
 {
   return HASH_FIND(src_hash, RSH, p, id);
 }
 
 struct rte_src *
-rt_get_source(struct proto *p, u32 id)
+rt_get_source(struct proto *p, u64 id)
 {
   struct rte_src *src = rt_find_source(p, id);