dhcp: internal: fix the logging message for the lease time

the lease time was incorrectly presented as the expiration time
This commit is contained in:
Francesco Giudici
2019-07-24 16:15:00 +02:00
parent 257d92717b
commit 31d74e8b45

View File

@@ -165,17 +165,18 @@ lease_to_ip4_config (NMDedupMultiIndex *multi_idx,
nm_utils_inet4_ntop (a_netmask.s_addr, addr_str)); nm_utils_inet4_ntop (a_netmask.s_addr, addr_str));
LOG_LEASE (LOGD_DHCP4, "%s '%u' seconds (at %lld)", LOG_LEASE (LOGD_DHCP4, "%s '%u' seconds (at %lld)",
nm_dhcp_option_request_string (_nm_dhcp_option_dhcp4_options, NM_DHCP_OPTION_DHCP4_NM_EXPIRY), nm_dhcp_option_request_string (_nm_dhcp_option_dhcp4_options,
NM_DHCP_OPTION_DHCP4_IP_ADDRESS_LEASE_TIME),
(guint) a_lifetime, (guint) a_lifetime,
(long long) (ts_time + a_lifetime)); (long long) (ts_time + a_lifetime));
nm_dhcp_option_add_option_u64 (options,
_nm_dhcp_option_dhcp4_options,
NM_DHCP_OPTION_DHCP4_NM_EXPIRY,
(guint64) (ts_time + a_lifetime));
nm_dhcp_option_add_option_u64 (options, nm_dhcp_option_add_option_u64 (options,
_nm_dhcp_option_dhcp4_options, _nm_dhcp_option_dhcp4_options,
NM_DHCP_OPTION_DHCP4_IP_ADDRESS_LEASE_TIME, NM_DHCP_OPTION_DHCP4_IP_ADDRESS_LEASE_TIME,
a_lifetime); a_lifetime);
nm_dhcp_option_add_option_u64 (options,
_nm_dhcp_option_dhcp4_options,
NM_DHCP_OPTION_DHCP4_NM_EXPIRY,
(guint64) (ts_time + a_lifetime));
nm_ip4_config_add_address (ip4_config, nm_ip4_config_add_address (ip4_config,
&((const NMPlatformIP4Address) { &((const NMPlatformIP4Address) {