diff options
author | Hans Dedecker <dedeckeh@gmail.com> | 2016-11-17 16:11:59 +0100 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2016-11-21 11:36:16 +0100 |
commit | d7732c6050cd091dac5e88b9b625e4cdb61acc69 (patch) | |
tree | b3edac52fadc20eb4726bf3a39d276210ba6720a | |
parent | 4fc68bde9fd7b630a2b51fe189e10e26714abc4d (diff) |
dhcpv6-ia: Display infinite lifetime as INT32_MAX in state file
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
-rw-r--r-- | src/dhcpv6-ia.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/dhcpv6-ia.c b/src/dhcpv6-ia.c index 597bc74..852af97 100644 --- a/src/dhcpv6-ia.c +++ b/src/dhcpv6-ia.c @@ -247,7 +247,8 @@ void dhcpv6_write_statefile(void) iface->ifname, duidbuf, ntohl(c->iaid), (c->hostname ? c->hostname : "-"), (unsigned)(c->valid_until > now ? - (c->valid_until - now + wall_time) : 0), + (c->valid_until - now + wall_time) : + (INFINITE_VALID(c->valid_until) ? INT32_MAX: 0)), c->assigned, (unsigned)c->length); struct in6_addr addr; @@ -309,7 +310,8 @@ void dhcpv6_write_statefile(void) iface->ifname, duidbuf, (c->hostname ? c->hostname : "-"), (unsigned)(c->valid_until > now ? - (c->valid_until - now + wall_time) : 0), + (c->valid_until - now + wall_time) : + (INFINITE_VALID(c->valid_until) ? INT32_MAX: 0)), c->addr); struct in_addr addr = {htonl(c->addr)}; |