From 21213be523baa7f2cbf0feaa617f265c55e9b17a Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Mon, 2 Oct 2023 15:09:30 +0200 Subject: Nest: Expand rte_src.private_id to u64 In general, private_id is sparse and protocols may want to map some internal values directly into it. For example, L3VPN needs to map VPN route discriminators to private_id. OTOH, u32 is enough for global_id, as these identifiers are dense. --- proto/bgp/packets.c | 2 +- proto/mrt/mrt.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'proto') 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); -- cgit v1.2.3