about summary refs log tree commit diff
path: root/src/core/ndisc
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2024-02-22 17:22:03 +0100
committerMichael Biebl <biebl@debian.org>2024-02-22 17:22:03 +0100
commitee7b97d8af11fb1c2cbcd4df0deb298ff906fa8b (patch)
treeb0978e9f3ed4e2e9b727844e57637783ca47a8ef /src/core/ndisc
parentd8ad0e3c21e712308cf070716acc421adfabd7d3 (diff)
parentbba2e4b4de668db525cbfdfc35292e5a0b51671a (diff)
Update upstream source from tag 'upstream/1.46.0'
Update to upstream version '1.46.0'
with Debian dir 8c30a24f4e6f4278d9943aef82e6ae63c4528df5
Diffstat (limited to 'src/core/ndisc')
-rw-r--r--src/core/ndisc/nm-ndisc.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/core/ndisc/nm-ndisc.c b/src/core/ndisc/nm-ndisc.c
index c8f7ed0c..e6b1a94e 100644
--- a/src/core/ndisc/nm-ndisc.c
+++ b/src/core/ndisc/nm-ndisc.c
@@ -114,7 +114,7 @@ nm_ndisc_data_to_l3cd(NMDedupMultiIndex        *multi_idx,
     nm_auto_unref_l3cd_init NML3ConfigData *l3cd = NULL;
     guint32                                 ifa_flags;
     guint                                   i;
-    const gint32                            now_sec = nm_utils_get_monotonic_timestamp_sec();
+    const gint64                            now_msec = nm_utils_get_monotonic_timestamp_msec();
 
     l3cd = nm_l3_config_data_new(multi_idx, ifindex, NM_IP_CONFIG_SOURCE_NDISC);
 
@@ -134,12 +134,10 @@ nm_ndisc_data_to_l3cd(NMDedupMultiIndex        *multi_idx,
             .ifindex   = ifindex,
             .address   = ndisc_addr->address,
             .plen      = 64,
-            .timestamp = now_sec,
-            .lifetime  = _nm_ndisc_lifetime_from_expiry(((gint64) now_sec) * 1000,
-                                                       ndisc_addr->expiry_msec,
-                                                       TRUE),
+            .timestamp = now_msec / 1000,
+            .lifetime  = _nm_ndisc_lifetime_from_expiry(now_msec, ndisc_addr->expiry_msec, TRUE),
             .preferred = _nm_ndisc_lifetime_from_expiry(
-                ((gint64) now_sec) * 1000,
+                now_msec,
                 NM_MIN(ndisc_addr->expiry_msec, ndisc_addr->expiry_preferred_msec),
                 TRUE),
             .addr_source = NM_IP_CONFIG_SOURCE_NDISC,