From d6e996fb145f9558957b277e70030bdeb5167c03 Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Sat, 30 May 2026 18:36:55 +0200 Subject: [PATCH] device: fix typo in EPOCH_DATETIME_THREE_YEARS constant The macro intended to represent approximately three years in seconds but used 356 days/year instead of 365, making the period 27 days shorter than intended. Fixes: 7a0b6b17bb99 ('libnm-core: add ipv6.dhcp-duid property') --- src/core/devices/nm-device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/devices/nm-device.c b/src/core/devices/nm-device.c index e882970479..a8a5285d1f 100644 --- a/src/core/devices/nm-device.c +++ b/src/core/devices/nm-device.c @@ -1294,7 +1294,7 @@ _prop_get_ipv6_dhcp_duid(NMDevice *self, gint64 time; guint32 timestamp; -#define EPOCH_DATETIME_THREE_YEARS (356 * 24 * 3600 * 3) +#define EPOCH_DATETIME_THREE_YEARS (365 * 24 * 3600 * 3) /* We want a variable time between the host_id timestamp and three years * before. Let's compute the time (in seconds) from 0 to 3 years; then we'll