X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=src%2Fdhcpv6.c;h=8be70af19797ffde5ed2ddf73646a13a90463280;hb=31ce2ea9f57322d526daf266c7fca4bd407297cb;hp=561cf836778e1f62cfb5c05584774f97d33e60ca;hpb=66216b3e5a55be3cc78179155a8f0f2dca79d172;p=odhcp6c.git diff --git a/src/dhcpv6.c b/src/dhcpv6.c index 561cf83..8be70af 100644 --- a/src/dhcpv6.c +++ b/src/dhcpv6.c @@ -76,7 +76,7 @@ static struct dhcpv6_retx dhcpv6_retx[_DHCPV6_MSG_MAX] = { // Sockets static int sock = -1; static int ifindex = -1; -static time_t t1 = 0, t2 = 0, t3 = 0; +static int64_t t1 = 0, t2 = 0, t3 = 0; // IA states static int request_prefix = -1; @@ -207,8 +207,8 @@ static void dhcpv6_send(enum dhcpv6_msg type, uint8_t trid[3], uint32_t ecs) for (size_t i = 0; i < ia_pd_entries; ++i) { p[i].type = htons(DHCPV6_OPT_IA_PREFIX); p[i].len = htons(sizeof(p[i]) - 4U); - p[i].preferred = htonl(e[i].preferred); - p[i].valid = htonl(e[i].valid); + p[i].preferred = 0; + p[i].valid = 0; p[i].prefix = e[i].length; p[i].addr = e[i].target; } @@ -241,8 +241,8 @@ static void dhcpv6_send(enum dhcpv6_msg type, uint8_t trid[3], uint32_t ecs) pa[i].type = htons(DHCPV6_OPT_IA_ADDR); pa[i].len = htons(sizeof(pa[i]) - 4U); pa[i].addr = e[i].target; - pa[i].preferred = htonl(e[i].preferred); - pa[i].valid = htonl(e[i].valid); + pa[i].preferred = 0; + pa[i].valid = 0; } ia_na = pa;