Unbreak dhcpd in v6 mode.

Upstream tries to use only IPV6_PKTINFO to specify the outgoing
interface index, but our kernel doesn't support this.  This lead
upstream to add a workaround for "bogus BSDs", namely set sin6_scope_id
in dhclient mode. But dhcpd/dhcrelay are affected by the same problem,
so always set sin6_scope_id.

Issue reported & initial diff proposed by Marc Peters, maintainer
timeout.
This commit is contained in:
jca 2017-01-30 11:34:15 +00:00
parent 9caff9647d
commit 13df2cae6d
2 changed files with 15 additions and 1 deletions

View File

@ -1,10 +1,11 @@
# $OpenBSD: Makefile,v 1.43 2016/10/24 12:24:13 sthen Exp $
# $OpenBSD: Makefile,v 1.44 2017/01/30 11:34:15 jca Exp $
COMMENT-main= ISC DHCP Server
COMMENT-client= ISC DHCP Client
COMMENT-omapi= ISC DHCP OMAPI
VERSION= 4.3.5
REVISION= 0
DISTNAME= isc-dhcp-${VERSION}
PKGNAME= isc-dhcp-${VERSION:S/-P/./}
PKGNAME-main= isc-dhcp-server-${VERSION:S/-P/./}

View File

@ -0,0 +1,13 @@
$OpenBSD: patch-common_socket_c,v 1.5 2017/01/30 11:34:15 jca Exp $
--- common/socket.c.orig Mon Jan 23 00:15:45 2017
+++ common/socket.c Mon Jan 23 00:15:51 2017
@@ -794,8 +794,7 @@ ssize_t send_packet6(struct interface_info *interface,
m.msg_name = &dst;
m.msg_namelen = sizeof(dst);
ifindex = if_nametoindex(interface->name);
- if (no_global_v6_socket)
- dst.sin6_scope_id = ifindex;
+ dst.sin6_scope_id = ifindex;
/*
* Set the data buffer we're sending. (Using this wacky