Module Name: src
Committed By: martin
Date: Sun Mar 10 18:51:54 UTC 2024
Modified Files:
src/sys/netinet6 [netbsd-10]: icmp6.c raw_ip6.c
Log Message:
Pull up following revision(s) (requested by riastradh in ticket #615):
sys/netinet6/raw_ip6.c: revision 1.184
sys/netinet6/icmp6.c: revision 1.256
Deliver timestamps also to raw sockets.
Fixes PR 57955
To generate a diff of this commit:
cvs rdiff -u -r1.254.2.1 -r1.254.2.2 src/sys/netinet6/icmp6.c
cvs rdiff -u -r1.182.2.1 -r1.182.2.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.254.2.1 src/sys/netinet6/icmp6.c:1.254.2.2
--- src/sys/netinet6/icmp6.c:1.254.2.1 Sun Dec 10 13:06:16 2023
+++ src/sys/netinet6/icmp6.c Sun Mar 10 18:51:54 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: icmp6.c,v 1.254.2.1 2023/12/10 13:06:16 martin Exp $ */
+/* $NetBSD: icmp6.c,v 1.254.2.2 2024/03/10 18:51:54 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.254.2.1 2023/12/10 13:06:16 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: icmp6.c,v 1.254.2.2 2024/03/10 18:51:54 martin 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.182.2.1 src/sys/netinet6/raw_ip6.c:1.182.2.2
--- src/sys/netinet6/raw_ip6.c:1.182.2.1 Thu Mar 23 12:03:04 2023
+++ src/sys/netinet6/raw_ip6.c Sun Mar 10 18:51:54 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: raw_ip6.c,v 1.182.2.1 2023/03/23 12:03:04 martin Exp $ */
+/* $NetBSD: raw_ip6.c,v 1.182.2.2 2024/03/10 18:51:54 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.182.2.1 2023/03/23 12:03:04 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: raw_ip6.c,v 1.182.2.2 2024/03/10 18:51:54 martin 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);