summaryrefslogtreecommitdiffstats
path: root/src/libsystemd-network/dhcp-lease-internal.h
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2023-11-08 05:49:03 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2023-11-08 09:58:51 +0100
commit905d0ea7b0080dd17db46460e6c962220dc8eeaf (patch)
treed420b8e002486628adabc188cc59fdfa3c3e0a0a /src/libsystemd-network/dhcp-lease-internal.h
parentsd-dhcp-client: move packet size check to dhcp_packet_verify_headers() (diff)
downloadsystemd-905d0ea7b0080dd17db46460e6c962220dc8eeaf.tar.xz
systemd-905d0ea7b0080dd17db46460e6c962220dc8eeaf.zip
sd-dhcp-client,-server: set timestamp based on the time when received a packet
It seems that RFC does not say anything about the timestamp of lease we should use: time that the client sent a request or received a reply. In DHCPv6 client and NDisc, we use a timestamp that we receive a packet, rather than we sent something. So, let's consistently use the same logic for DHCPv4 client. By using the logic, we will hopefully not forget to set timestamp again, which is fixed by 089362976c2a653a77f942bfeb3f61d0e180f078.
Diffstat (limited to 'src/libsystemd-network/dhcp-lease-internal.h')
-rw-r--r--src/libsystemd-network/dhcp-lease-internal.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd-network/dhcp-lease-internal.h b/src/libsystemd-network/dhcp-lease-internal.h
index 0b72813733..a3d8bb45b3 100644
--- a/src/libsystemd-network/dhcp-lease-internal.h
+++ b/src/libsystemd-network/dhcp-lease-internal.h
@@ -90,8 +90,8 @@ int dhcp_lease_parse_options(uint8_t code, uint8_t len, const void *option, void
int dhcp_lease_parse_search_domains(const uint8_t *option, size_t len, char ***domains);
int dhcp_lease_insert_private_option(sd_dhcp_lease *lease, uint8_t tag, const void *data, uint8_t len);
+void dhcp_lease_set_timestamp(sd_dhcp_lease *lease, const triple_timestamp *timestamp);
int dhcp_lease_set_default_subnet_mask(sd_dhcp_lease *lease);
-
int dhcp_lease_set_client_id(sd_dhcp_lease *lease, const void *client_id, size_t client_id_len);
#define dhcp_lease_unref_and_replace(a, b) \