mirror of
http://thekelleys.org.uk/git/dnsmasq.git
synced 2026-10-21 11:39:39 +00:00
Fix DUID generation with HAVE_BROKEN_RTC.
This commit is contained in:
1 parent
7b6dd880f7
commit
e3e86343fc
1 file changed
+6
-8
+6
-8
@@ -383,18 +383,16 @@ static int make_duid1(int index, unsigned int type, char *mac, size_t maclen, vo
|
||||
|
||||
(void)index;
|
||||
|
||||
#ifdef HAVE_BROKEN_RTC
|
||||
daemon->duid = p = safe_malloc(maclen + 4);
|
||||
daemon->duid_len = maclen + 4;
|
||||
PUTSHORT(3, p); /* DUID_LL */
|
||||
PUTSHORT(type, p); /* address type */
|
||||
#else
|
||||
daemon->duid = p = safe_malloc(maclen + 8);
|
||||
daemon->duid_len = maclen + 8;
|
||||
|
||||
#ifdef HAVE_BROKEN_RTC
|
||||
PUTSHORT(3, p); /* DUID_LL */
|
||||
#else
|
||||
PUTSHORT(1, p); /* DUID_LLT */
|
||||
#endif
|
||||
|
||||
PUTSHORT(type, p); /* address type */
|
||||
|
||||
#ifndef HAVE_BROKEN_RTC
|
||||
PUTLONG(*((time_t *)parm), p); /* time */
|
||||
#endif
|
||||
|
||||
|
||||
Reference in new issue
Block a user