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/dt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ipcpd/unicast/dt.c') diff --git a/src/ipcpd/unicast/dt.c b/src/ipcpd/unicast/dt.c index aece10cb..e2679ffe 100644 --- a/src/ipcpd/unicast/dt.c +++ b/src/ipcpd/unicast/dt.c @@ -215,7 +215,7 @@ static int dt_rib_read(const char * path, if (dt.stat[fd].addr == dt.addr) sprintf(addrstr, "%s", dt.comps[fd].name); else - sprintf(addrstr, "%" PRIu64, dt.stat[fd].addr); + sprintf(addrstr, ADDR_FMT32, ADDR_VAL32(&dt.stat[fd].addr)); tm = gmtime(&dt.stat[fd].stamp); strftime(tmstr, sizeof(tmstr), RIB_TM_FORMAT, tm); @@ -652,7 +652,7 @@ int dt_init(struct dt_config cfg) dt.n_flows = 0; #endif - sprintf(dtstr, "%s.%" PRIu64, DT, dt.addr); + sprintf(dtstr, "%s." ADDR_FMT32, DT, ADDR_VAL32(&dt.addr)); if (rib_reg(dtstr, &r_ops)) { log_err("Failed to register RIB."); goto fail_rib_reg; -- cgit v1.2.3