diff --git a/src/modules/localip.c b/src/modules/localip.c index 1d8192df4..6bc2455f2 100644 --- a/src/modules/localip.c +++ b/src/modules/localip.c @@ -5,6 +5,7 @@ #define FF_LOCALIP_NUM_FORMAT_ARGS 1 #include +#include #include #include #include @@ -54,7 +55,7 @@ void ffPrintLocalIp(FFinstance* instance) continue; // loop back - if (strcmp(ifa->ifa_name, "lo") == 0 && !instance->config.localIpShowLoop) + if (strncmp(ifa->ifa_name, "lo", 2) == 0 && (ifa->ifa_name[2] == '\0' || isdigit(ifa->ifa_name[2])) && !instance->config.localIpShowLoop) continue; if (ifa->ifa_addr->sa_family == AF_INET) { // check it is IP4