#include "duid.h"
#include "logerr.h"
+/*
+ * Machine, system or product UUIDs are not guaranteed unique.
+ * Let's not use them by default.
+ */
+#ifdef USE_MACHINE_UUID
static size_t
duid_machineuuid(char *uuid, size_t uuid_len)
{
l += hwaddr_aton(d, uuid);
return l;
}
+#endif
size_t
duid_make(void *d, const struct interface *ifp, uint16_t type)
/* No file? OK, lets make one based the machines UUID */
if (ifp == NULL) {
+#ifdef USE_MACHINE_UUID
if (ctx->duid_type != DUID_DEFAULT &&
ctx->duid_type != DUID_UUID)
len = 0;
else
ctx->duid = data;
return len;
+#else
+ free(data);
+ return 0;
+#endif
}
/* Regardless of what happens we will create a DUID to use. */