summaryrefslogtreecommitdiff
path: root/sys/netinet6/icmp6.c
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2023-11-28 13:23:21 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2023-11-28 13:23:21 +0000
commit4b29b6817dd3dbbdce9da388108c795f403a4973 (patch)
tree114dcc0e12733e67d61b67f183cbe52db5538341 /sys/netinet6/icmp6.c
parentd7785c2ebe5dcb50b51336f4888dba90a71b0f01 (diff)
Remove struct inpcb from in6_embedscope() parameters.
rip6_output() did modify inp_outputopts6 temporarily to provide different ip6_pktopts to in6_embedscope(). Better pass inp_outputopts6 and inp_moptions6 as separate arguments to in6_embedscope(). Simplify the code that deals with these options in in6_embedscope(). Doucument inp_moptions and inp_moptions6 as protected by net lock. OK kn@
Diffstat (limited to 'sys/netinet6/icmp6.c')
-rw-r--r--sys/netinet6/icmp6.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c
index 868f3f5d755..aece612d01f 100644
--- a/sys/netinet6/icmp6.c
+++ b/sys/netinet6/icmp6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: icmp6.c,v 1.249 2023/09/16 09:33:27 mpi Exp $ */
+/* $OpenBSD: icmp6.c,v 1.250 2023/11/28 13:23:20 bluhm Exp $ */
/* $KAME: icmp6.c,v 1.217 2001/06/20 15:03:29 jinmei Exp $ */
/*
@@ -910,7 +910,8 @@ icmp6_notify_error(struct mbuf *m, int off, int icmp6len, int code)
icmp6dst.sin6_addr = *finaldst;
icmp6dst.sin6_scope_id = in6_addr2scopeid(m->m_pkthdr.ph_ifidx,
&icmp6dst.sin6_addr);
- if (in6_embedscope(&icmp6dst.sin6_addr, &icmp6dst, NULL)) {
+ if (in6_embedscope(&icmp6dst.sin6_addr, &icmp6dst,
+ NULL, NULL)) {
/* should be impossible */
nd6log((LOG_DEBUG,
"icmp6_notify_error: in6_embedscope failed\n"));
@@ -927,7 +928,8 @@ icmp6_notify_error(struct mbuf *m, int off, int icmp6len, int code)
icmp6src.sin6_addr = eip6->ip6_src;
icmp6src.sin6_scope_id = in6_addr2scopeid(m->m_pkthdr.ph_ifidx,
&icmp6src.sin6_addr);
- if (in6_embedscope(&icmp6src.sin6_addr, &icmp6src, NULL)) {
+ if (in6_embedscope(&icmp6src.sin6_addr, &icmp6src,
+ NULL, NULL)) {
/* should be impossible */
nd6log((LOG_DEBUG,
"icmp6_notify_error: in6_embedscope failed\n"));