summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Markwalder <tmark@isc.org>2019-07-18 09:05:52 -0400
committerThomas Markwalder <tmark@isc.org>2019-10-14 10:03:44 -0400
commit6088ee2935aabe5a8805c47b910a891c49600744 (patch)
tree029a09e54afa05f51720463ea23f74b9e17a91e7
parent1cb5ed40f8b01130ade94f7d466c370b5a64c5bc (diff)
downloadisc-dhcp-6088ee2935aabe5a8805c47b910a891c49600744.tar.gz
[#33,!17] Omit v6 scope id guard under OpenBSD
RELNOTES - added release note common/socket.c send_packet6() - wrapped the guard logic around setting the scope id with conditional compilation to exclude it under OpenBSD.
-rw-r--r--RELNOTES6
-rw-r--r--common/socket.c8
2 files changed, 13 insertions, 1 deletions
diff --git a/RELNOTES b/RELNOTES
index 79a73444..fbd3fafd 100644
--- a/RELNOTES
+++ b/RELNOTES
@@ -151,6 +151,12 @@ by Eric Young (eay@cryptsoft.com).
to Tommy Smith for contributing the patch.
[Gitlab #26,!15 git c6c4db599aa5fb562e95e723cef00a3e30c3b14b]
+- Applied a patch from OpenBSD to always set the scope id of outbound
+ DHPCv6 packets. Note this change only applies when compiling under
+ OpenBSD. Thanks to Brad Smith at OpenBSD from bringing it to our
+ attention.
+ [Gitlab #33,!17 git TBD]
+
Changes since 4.4.0 (New Features)
- none
Changes since 4.4.0 (Bug Fixes)
diff --git a/common/socket.c b/common/socket.c
index 483eb9c3..90a971a5 100644
--- a/common/socket.c
+++ b/common/socket.c
@@ -3,7 +3,7 @@
BSD socket interface code... */
/*
- * Copyright (c) 2004-2017 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2004-2019 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1995-2003 by Internet Software Consortium
*
* This Source Code Form is subject to the terms of the Mozilla Public
@@ -877,7 +877,13 @@ ssize_t send_packet6(struct interface_info *interface,
m.msg_name = &dst;
m.msg_namelen = sizeof(dst);
ifindex = if_nametoindex(interface->name);
+
+// Per OpenBSD patch-common_socket_c,v 1.7 2018/03/06 08:37:39 sthen Exp
+// always set the scope id. We'll leave the test for no global socket
+// in place for all others.
+#ifndef __OpenBSD__
if (no_global_v6_socket)
+#endif
dst.sin6_scope_id = ifindex;
/*