]> git.ipfire.org Git - thirdparty/systemd.git/commit
sd-dhcp-client,-server: set timestamp based on the time when received a packet 29921/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 8 Nov 2023 04:49:03 +0000 (13:49 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 8 Nov 2023 08:58:51 +0000 (17:58 +0900)
commit905d0ea7b0080dd17db46460e6c962220dc8eeaf
treed420b8e002486628adabc188cc59fdfa3c3e0a0a
parenta57dd1d13ff96022b76fe2a7f7e5be538cf526a1
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.
src/libsystemd-network/dhcp-lease-internal.h
src/libsystemd-network/dhcp-network.c
src/libsystemd-network/dhcp-server-internal.h
src/libsystemd-network/fuzz-dhcp-client.c
src/libsystemd-network/fuzz-dhcp-server.c
src/libsystemd-network/sd-dhcp-client.c
src/libsystemd-network/sd-dhcp-lease.c
src/libsystemd-network/sd-dhcp-server.c
src/libsystemd-network/test-dhcp-server.c