diff --git a/libs/rpcd-mod-luci/src/luci.c b/libs/rpcd-mod-luci/src/luci.c index 8b56dce6b7..d9e2ab79ce 100644 --- a/libs/rpcd-mod-luci/src/luci.c +++ b/libs/rpcd-mod-luci/src/luci.c @@ -329,6 +329,15 @@ duid2ea(const char *duid) return &ea; } +static void strip_colon_duid(char *str) { + char *pr = str, *pw = str; + + while (*pr) { + *pw = *pr++; + pw += (*pw != ':'); + } + *pw = '\0'; +} static struct { time_t now; @@ -592,6 +601,8 @@ lease_next(void) if (!e.hostname || !e.duid) continue; + strip_colon_duid(e.duid); + if (!strcmp(e.hostname, "*")) e.hostname = NULL;