From f1fcec220c8454cb461bd1ac22621a1b64609051 Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Fri, 15 Aug 2025 19:01:23 +0200 Subject: ipcpd: Fix addresses in RIB entries The entries of the RIB were broken as some paths in FUSE were checked against the old entry format. Updated the address format to use a dot to avoid escaping colons and spaces and be friendlier to command line tools such as 'cat'. Signed-off-by: Dimitri Staessens --- src/ipcpd/unicast/routing/link-state.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ipcpd/unicast/routing') diff --git a/src/ipcpd/unicast/routing/link-state.c b/src/ipcpd/unicast/routing/link-state.c index 1b0faab8..e5edf539 100644 --- a/src/ipcpd/unicast/routing/link-state.c +++ b/src/ipcpd/unicast/routing/link-state.c @@ -62,7 +62,7 @@ #define CLOCK_REALTIME_COARSE CLOCK_REALTIME #endif -#define LINK_FMT ADDR_FMT32 " -- " ADDR_FMT32 +#define LINK_FMT ADDR_FMT32 "--" ADDR_FMT32 #define LINK_VAL(src, dst) ADDR_VAL32(&src), ADDR_VAL32(&dst) #define LSU_FMT "LSU ["ADDR_FMT32 " -- " ADDR_FMT32 " seq: %09" PRIu64 "]" @@ -191,7 +191,7 @@ static struct adjacency * get_adj(const char * path) list_for_each(p, &ls.db.list) { struct adjacency * a = list_entry(p, struct adjacency, next); - sprintf(entry, "%" PRIu64 ".%" PRIu64, a->src, a->dst); + sprintf(entry, LINK_FMT, LINK_VAL(a->src, a->dst)); if (strcmp(entry, path) == 0) return a; } -- cgit v1.2.3