]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
might as well support this, too
authorAlan T. DeKok <aland@freeradius.org>
Wed, 3 Jan 2024 14:17:52 +0000 (09:17 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 3 Jan 2024 14:18:03 +0000 (09:18 -0500)
src/lib/util/udpfromto.c

index 7f737795728df61c52ffb2673f2df0547d85f528..c5eb8cb92287219ab9cb62b4b2de5cce4939b896 100644 (file)
@@ -357,6 +357,12 @@ DIAG_ON(sign-compare)
                        *when = fr_time_from_timeval((struct timeval *)CMSG_DATA(cmsg));
                }
 #endif
+
+#ifdef SO_TIMESTAMPNS
+               if (when && (cmsg->cmsg_level == SOL_IP) && (cmsg->cmsg_type == SO_TIMESTAMPNS)) {
+                       *when = fr_time_from_timespec((struct timeval *)CMSG_DATA(cmsg));
+               }
+#endif
        }
 
        if (when && fr_time_eq(*when, fr_time_wrap(0))) *when = fr_time();