From: Ben Pfaff Date: Fri, 9 Jan 2009 00:45:34 +0000 (-0800) Subject: dhcp-client: Add comment about time going backward. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=517ad35c42b308867b641fe999e92572bbafff24;p=openvswitch dhcp-client: Add comment about time going backward. Issue raised by Chris Eagle via Fortify. --- diff --git a/lib/dhcp-client.c b/lib/dhcp-client.c index d12ac3d4..919bc31d 100644 --- a/lib/dhcp-client.c +++ b/lib/dhcp-client.c @@ -897,6 +897,10 @@ dhclient_msg_init(struct dhclient *cli, enum dhcp_msg_type type, memcpy(msg->chaddr, netdev_get_etheraddr(cli->netdev), ETH_ADDR_LEN); } +/* If time goes backward this returns a large number, which makes it look like + * we've been in the current state a very long time. That's probably + * fine for that corner case--we'll just expire our lease, etc., and try to + * get a new one. */ static unsigned int elapsed_in_this_state(const struct dhclient *cli) {