From d221f39731be40ed3821f8db09d590edb849cb0c Mon Sep 17 00:00:00 2001
From: Ondrej Zajicek <santiago@crfreenet.org>
Date: Tue, 17 Dec 2024 09:00:42 +0100
Subject: [PATCH] Nest: Fix handling of 64-bit rte_src.private_id

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   | 4 ++--
 nest/rt-attr.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/nest/route.h b/nest/route.h
index be3d759e..3ff61182 100644
--- a/nest/route.h
+++ b/nest/route.h
@@ -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);
diff --git a/nest/rt-attr.c b/nest/rt-attr.c
index a567720e..7c49af17 100644
--- a/nest/rt-attr.c
+++ b/nest/rt-attr.c
@@ -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);