Module Name: src Committed By: mlelstv Date: Sat Feb 24 21:41:13 UTC 2024
Modified Files: src/sys/netinet6: icmp6.c raw_ip6.c Log Message: Deliver timestamps also to raw sockets. Fixes PR 57955 To generate a diff of this commit: cvs rdiff -u -r1.255 -r1.256 src/sys/netinet6/icmp6.c cvs rdiff -u -r1.183 -r1.184 src/sys/netinet6/raw_ip6.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/netinet6/icmp6.c diff -u src/sys/netinet6/icmp6.c:1.255 src/sys/netinet6/icmp6.c:1.256 --- src/sys/netinet6/icmp6.c:1.255 Sat Dec 9 15:21:02 2023 +++ src/sys/netinet6/icmp6.c Sat Feb 24 21:41:13 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: icmp6.c,v 1.255 2023/12/09 15:21:02 pgoyette Exp $ */ +/* $NetBSD: icmp6.c,v 1.256 2024/02/24 21:41:13 mlelstv Exp $ */ /* $KAME: icmp6.c,v 1.217 2001/06/20 15:03:29 jinmei Exp $ */ /* @@ -62,7 +62,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: icmp6.c,v 1.255 2023/12/09 15:21:02 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: icmp6.c,v 1.256 2024/02/24 21:41:13 mlelstv Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -1987,7 +1987,8 @@ icmp6_rip6_input(struct mbuf **mp, int o } #endif else if ((n = m_copypacket(m, M_DONTWAIT)) != NULL) { - if (last->inp_flags & IN6P_CONTROLOPTS) + if (last->inp_flags & IN6P_CONTROLOPTS || + SOOPT_TIMESTAMP(last->inp_socket->so_options)) ip6_savecontrol(last, &opts, ip6, n); /* strip intermediate headers */ m_adj(n, off); @@ -2014,7 +2015,8 @@ icmp6_rip6_input(struct mbuf **mp, int o } else #endif if (last) { - if (last->inp_flags & IN6P_CONTROLOPTS) + if (last->inp_flags & IN6P_CONTROLOPTS || + SOOPT_TIMESTAMP(last->inp_socket->so_options)) ip6_savecontrol(last, &opts, ip6, m); /* strip intermediate headers */ m_adj(m, off); Index: src/sys/netinet6/raw_ip6.c diff -u src/sys/netinet6/raw_ip6.c:1.183 src/sys/netinet6/raw_ip6.c:1.184 --- src/sys/netinet6/raw_ip6.c:1.183 Wed Mar 22 03:17:18 2023 +++ src/sys/netinet6/raw_ip6.c Sat Feb 24 21:41:13 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: raw_ip6.c,v 1.183 2023/03/22 03:17:18 ozaki-r Exp $ */ +/* $NetBSD: raw_ip6.c,v 1.184 2024/02/24 21:41:13 mlelstv Exp $ */ /* $KAME: raw_ip6.c,v 1.82 2001/07/23 18:57:56 jinmei Exp $ */ /* @@ -62,7 +62,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: raw_ip6.c,v 1.183 2023/03/22 03:17:18 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: raw_ip6.c,v 1.184 2024/02/24 21:41:13 mlelstv Exp $"); #ifdef _KERNEL_OPT #include "opt_ipsec.h" @@ -140,7 +140,8 @@ rip6_sbappendaddr(struct inpcb *last, st { struct mbuf *opts = NULL; - if (last->inp_flags & IN6P_CONTROLOPTS) + if (last->inp_flags & IN6P_CONTROLOPTS || + SOOPT_TIMESTAMP(last->inp_socket->so_options)) ip6_savecontrol(last, &opts, ip6, n); m_adj(n, hlen);