summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikael Magnusson <mikma@users.sourceforge.net>2023-11-25 23:37:25 +0100
committerMikael Magnusson <mikma@users.sourceforge.net>2023-11-25 23:37:25 +0100
commitdf96a5e1a067cbcf9c73f4c76700ff48019fde7b (patch)
treed782c6cfa88d6aa0ed0020a61ad29225796f5dfd
parent2e07c7615ab27d647d1f7b1e3b93b19f53b40dac (diff)
parent21213be523baa7f2cbf0feaa617f265c55e9b17a (diff)
Merge commit '21213be5' into wireguard-next-tmp7-1
-rw-r--r--nest/route.h2
-rw-r--r--nest/rt-attr.c2
-rw-r--r--nest/rt-table.c2
-rw-r--r--proto/bgp/packets.c2
-rw-r--r--proto/mrt/mrt.c2
5 files changed, 5 insertions, 5 deletions
diff --git a/nest/route.h b/nest/route.h
index c515420c..828ac804 100644
--- a/nest/route.h
+++ b/nest/route.h
@@ -439,7 +439,7 @@ struct nexthop {
struct rte_src {
struct rte_src *next; /* Hash chain */
struct proto *proto; /* Protocol the source is based on */
- u32 private_id; /* Private ID, assigned by the protocol */
+ u64 private_id; /* Private ID, assigned by the protocol */
u32 global_id; /* Globally unique ID of the source */
unsigned uc; /* Use count */
};
diff --git a/nest/rt-attr.c b/nest/rt-attr.c
index b341ff46..9e29abc8 100644
--- a/nest/rt-attr.c
+++ b/nest/rt-attr.c
@@ -101,7 +101,7 @@ static struct idm src_ids;
#define RSH_KEY(n) n->proto, n->private_id
#define RSH_NEXT(n) n->next
#define RSH_EQ(p1,n1,p2,n2) p1 == p2 && n1 == n2
-#define RSH_FN(p,n) p->hash_key ^ u32_hash(n)
+#define RSH_FN(p,n) p->hash_key ^ u64_hash(n)
#define RSH_REHASH rte_src_rehash
#define RSH_PARAMS /2, *2, 1, 1, 8, 20
diff --git a/nest/rt-table.c b/nest/rt-table.c
index 8b41ffee..5e677465 100644
--- a/nest/rt-table.c
+++ b/nest/rt-table.c
@@ -675,7 +675,7 @@ rte_mergable(rte *pri, rte *sec)
static void
rte_trace(struct channel *c, rte *e, int dir, char *msg)
{
- log(L_TRACE "%s.%s %c %s %N %uL %uG %s",
+ log(L_TRACE "%s.%s %c %s %N %luL %uG %s",
c->proto->name, c->name ?: "?", dir, msg, e->net->n.addr, e->src->private_id, e->src->global_id,
rta_dest_name(e->attrs->dest));
}
diff --git a/proto/bgp/packets.c b/proto/bgp/packets.c
index fd7828f0..054e6c3c 100644
--- a/proto/bgp/packets.c
+++ b/proto/bgp/packets.c
@@ -2499,7 +2499,7 @@ bgp_bmp_encode_rte(struct bgp_channel *c, byte *buf, const net_addr *n,
/* Sham prefix */
struct bgp_prefix *px = alloca(prefix_size);
*px = (struct bgp_prefix) { };
- px->path_id = src->private_id;
+ px->path_id = (u32) src->private_id;
net_copy(px->net, n);
add_tail(&b->prefixes, &px->buck_node);
diff --git a/proto/mrt/mrt.c b/proto/mrt/mrt.c
index d1c334e1..3378bace 100644
--- a/proto/mrt/mrt.c
+++ b/proto/mrt/mrt.c
@@ -488,7 +488,7 @@ mrt_rib_table_entry(struct mrt_table_dump_state *s, rte *r)
/* Path Identifier */
if (s->add_path)
- mrt_put_u32(b, r->src->private_id);
+ mrt_put_u32(b, (u32) r->src->private_id);
/* Route Attributes */
mrt_put_u16(b, 0);