From e02d30dcc5ac38627a681f735673b382caed6698 Mon Sep 17 00:00:00 2001 From: "Nicholas J. Kain" Date: Wed, 27 May 2015 13:11:23 -0400 Subject: [PATCH] renewTime, rebindTime should be unsigned long long. While we're at it, rearrange the client state struct to save some space lost to padding. --- src/ndhc.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ndhc.h b/src/ndhc.h index 6815441..467a102 100644 --- a/src/ndhc.h +++ b/src/ndhc.h @@ -35,20 +35,20 @@ #include "nk/random.h" struct client_state_t { - unsigned long long leaseStartTime; + struct nk_random_state_u32 rnd32_state; + unsigned long long leaseStartTime, renewTime, rebindTime; + long long dhcp_wake_ts; int ifsPrevState; int ifDeconfig; // Set if the interface has already been deconfigured. int epollFd, signalFd, listenFd, arpFd, nlFd, rfkillFd; int nlPortId; unsigned int num_dhcp_requests; uint32_t clientAddr, serverAddr, srcAddr, routerAddr; - uint32_t lease, renewTime, rebindTime, xid; - struct nk_random_state_u32 rnd32_state; + uint32_t lease, xid; uint8_t routerArp[6], serverArp[6]; uint8_t using_dhcp_bpf, init, got_router_arp, got_server_arp, check_fingerprint; bool arp_is_defense; - long long dhcp_wake_ts; }; struct client_config_t {