Module Name: src Committed By: martin Date: Sun Mar 10 18:54:41 UTC 2024
Modified Files: src/sys/netinet6 [netbsd-9]: icmp6.c raw_ip6.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1809): sys/netinet6/raw_ip6.c: revision 1.184 (patch) sys/netinet6/icmp6.c: revision 1.256 (patch) Deliver timestamps also to raw sockets. Fixes PR 57955 To generate a diff of this commit: cvs rdiff -u -r1.242 -r1.242.4.1 src/sys/netinet6/icmp6.c cvs rdiff -u -r1.175.4.1 -r1.175.4.2 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.242 src/sys/netinet6/icmp6.c:1.242.4.1 --- src/sys/netinet6/icmp6.c:1.242 Sat Dec 22 14:07:54 2018 +++ src/sys/netinet6/icmp6.c Sun Mar 10 18:54:41 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: icmp6.c,v 1.242 2018/12/22 14:07:54 maxv Exp $ */ +/* $NetBSD: icmp6.c,v 1.242.4.1 2024/03/10 18:54:41 martin 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.242 2018/12/22 14:07:54 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: icmp6.c,v 1.242.4.1 2024/03/10 18:54:41 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -1965,7 +1965,8 @@ icmp6_rip6_input(struct mbuf **mp, int o } #endif else if ((n = m_copypacket(m, M_DONTWAIT)) != NULL) { - if (last->in6p_flags & IN6P_CONTROLOPTS) + if (last->in6p_flags & IN6P_CONTROLOPTS || + SOOPT_TIMESTAMP(last->in6p_socket->so_options)) ip6_savecontrol(last, &opts, ip6, n); /* strip intermediate headers */ m_adj(n, off); @@ -1992,7 +1993,8 @@ icmp6_rip6_input(struct mbuf **mp, int o } else #endif if (last) { - if (last->in6p_flags & IN6P_CONTROLOPTS) + if (last->in6p_flags & IN6P_CONTROLOPTS || + SOOPT_TIMESTAMP(last->in6p_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.175.4.1 src/sys/netinet6/raw_ip6.c:1.175.4.2 --- src/sys/netinet6/raw_ip6.c:1.175.4.1 Thu Mar 23 12:06:49 2023 +++ src/sys/netinet6/raw_ip6.c Sun Mar 10 18:54:41 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: raw_ip6.c,v 1.175.4.1 2023/03/23 12:06:49 martin Exp $ */ +/* $NetBSD: raw_ip6.c,v 1.175.4.2 2024/03/10 18:54:41 martin 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.175.4.1 2023/03/23 12:06:49 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: raw_ip6.c,v 1.175.4.2 2024/03/10 18:54:41 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_ipsec.h" @@ -140,7 +140,8 @@ rip6_sbappendaddr(struct in6pcb *last, s { struct mbuf *opts = NULL; - if (last->in6p_flags & IN6P_CONTROLOPTS) + if (last->in6p_flags & IN6P_CONTROLOPTS || + SOOPT_TIMESTAMP(last->in6p_socket->so_options)) ip6_savecontrol(last, &opts, ip6, n); m_adj(n, hlen);