summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorkn <kn@cvs.openbsd.org>2020-07-17 15:21:37 +0000
committerkn <kn@cvs.openbsd.org>2020-07-17 15:21:37 +0000
commitaa4046ce091ef5f8e9436f8ec54516ba08c84006 (patch)
tree9367e589afec2858f8b8b7299cef5b61eb0d7b15 /sys
parent3066660fdc9ddc1bb5f80a8900921743f8f2c167 (diff)
Copy the right value to fix getsockopt(2) for SO_RTABLE and IPV6_PIPEX
r1.146 "Enable IPv6 routing domain support" adapted the mtod() line from the IPV6_PIPEX case which was bogus since introduction in r1.118. Issue found by florian, who came up with the same partial diff for SO_RTABLE while working on rdomain aware slaacd(8). Taken from sys/netinet/ip_output.c which does it correctly. OK florian millert
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet6/ip6_output.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c
index a4c5c816e54..3e2bf9872d4 100644
--- a/sys/netinet6/ip6_output.c
+++ b/sys/netinet6/ip6_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip6_output.c,v 1.246 2020/06/22 11:30:23 krw Exp $ */
+/* $OpenBSD: ip6_output.c,v 1.247 2020/07/17 15:21:36 kn Exp $ */
/* $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $ */
/*
@@ -1576,11 +1576,11 @@ do { \
break;
case SO_RTABLE:
m->m_len = sizeof(u_int);
- *mtod(m, u_int *) = optval;
+ *mtod(m, u_int *) = inp->inp_rtableid;
break;
case IPV6_PIPEX:
m->m_len = sizeof(int);
- *mtod(m, int *) = optval;
+ *mtod(m, int *) = inp->inp_pipex;
break;
default: