]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
duid: test that we actually have a uuid on Linux
authorRoy Marples <roy@marples.name>
Wed, 19 Sep 2018 08:07:58 +0000 (09:07 +0100)
committerRoy Marples <roy@marples.name>
Wed, 19 Sep 2018 08:07:58 +0000 (09:07 +0100)
src/duid.c

index cc53f9bdc53b24cdb321aff83212d833546ac416..4faab9aba16456a943803ba799973d5bb0a7433f 100644 (file)
@@ -88,7 +88,7 @@ duid_machineuuid(char *uuid, size_t uuid_len)
        }
        len = strlen(uuid) + 1;
        fclose(fp);
-       r = 0;
+       r = len == 1 ? -1 : 0;
 #else
        r = -1;
        errno = ENOSYS;