Report information
The Basics
Id:
40086
Status:
open
Priority:
Medium/Medium
Queue:

People
Owner:
Nobody in particular
Cc:
AdminCc:

BugTracker
Version Fixed:
(no value)
Version Found:
(no value)
Versions Affected:
(no value)
Versions Planned:
(no value)
Priority:
P2 Normal
Severity:
S2 Normal
CVSS Score:
(no value)
CVE ID:
(no value)
Component:
DHCP Relay
Area:
bug

Dates
Created:Thu, 16 Jul 2015 17:42:02 -0400
Updated:Thu, 17 Aug 2017 11:23:58 -0400
Closed:Not set



This bug tracker is no longer active.

Please go to our Gitlab to submit issues (both feature requests and bug reports) for active projects maintained by Internet Systems Consortium (ISC).

Due to security and confidentiality requirements, full access is limited to the primary maintainers.

Subject: dhcrelay v6: No route to host
Date: Thu, 16 Jul 2015 16:41:53 -0500
To: dhcp-bugs@isc.org
From: "vladv" <vladv@rvtn.org>
On OpenBSD 5.7, with ISC DHCP 4.3.2, the DHCP relay does not properly forward packets to the downstream interface, instead logging "send_packet6: No route to host". Indeed, a proper route to the host exists, and connectivity is confirmed. Instead, it appears that dhcrelay is not properly setting the sin6_scope_id for the outbound packet. An example follows: # sbin/dhcrelay -d -6 -l vlan3930 -u vlan3920 Internet Systems Consortium DHCP Relay Agent 4.3.2 Copyright 2004-2015 Internet Systems Consortium. All rights reserved. For info, please visit https://www.isc.org/software/dhcp/ Bound to *:547 Listening on Socket/vlan3920 Sending on Socket/vlan3920 Listening on Socket/vlan3930 Sending on Socket/vlan3930 Setting hop count limit to 32 for interface vlan3920 Relaying Solicit from fe80::fd8d:a178:51dd:601 port 546 going up. Relaying Advertise to fe80::fd8d:a178:51dd:601 port 546 down. send_packet6: No route to host Relaying Solicit from fe80::fd8d:a178:51dd:601 port 546 going up. Relaying Advertise to fe80::fd8d:a178:51dd:601 port 546 down. send_packet6: No route to host Relaying Solicit from fe80::fd8d:a178:51dd:601 port 546 going up. Relaying Advertise to fe80::fd8d:a178:51dd:601 port 546 down. send_packet6: No route to host Relaying Solicit from fe80::fd8d:a178:51dd:601 port 546 going up. Relaying Advertise to fe80::fd8d:a178:51dd:601 port 546 down. send_packet6: No route to host ---------- I was able to rectify the issue by modifying common/socket.c to set the sin6_scope_id in all cases: # diff -up common/socket.c.orig common/socket.c --- common/socket.c.orig Thu Jul 16 10:29:06 2015 +++ common/socket.c Thu Jul 16 10:29:52 2015 @@ -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 ---------- The patched dhcrelay works as expected: # sbin/dhcrelay -d -6 -l vlan3930 -u vlan3920 Internet Systems Consortium DHCP Relay Agent 4.3.2 Copyright 2004-2015 Internet Systems Consortium. All rights reserved. For info, please visit https://www.isc.org/software/dhcp/ Bound to *:547 Listening on Socket/vlan3920 Sending on Socket/vlan3920 Listening on Socket/vlan3930 Sending on Socket/vlan3930 Setting hop count limit to 32 for interface vlan3920 Relaying Solicit from fe80::fd8d:a178:51dd:601 port 546 going up. Relaying Advertise to fe80::fd8d:a178:51dd:601 port 546 down. Relaying Request from fe80::fd8d:a178:51dd:601 port 546 going up. Relaying Reply to fe80::fd8d:a178:51dd:601 port 546 down. Relaying Renew from fe80::fd8d:a178:51dd:601 port 546 going up. Relaying Reply to fe80::fd8d:a178:51dd:601 port 546 down. ---------- I do not know the consequences of always setting sin6_scope_id on the operation of dhclient or dhcpd, nor have I tested it on systems other than OpenBSD. Best, Vladimir Voskoboynikov

Message body not shown because it is not plain text.

Message body not shown because it is not plain text.

On Thu Jul 16 21:42:02 2015, vladv@rvtn.org wrote: > I do not know the consequences of always setting sin6_scope_id > on the operation of dhclient or dhcpd, nor have I tested it on systems > other than OpenBSD. => as an IPv6 implementor I can answer: usually setting the sin6_scope_id when it is not required does nothing (i.e., it is ignored). Nevertheless I recommend to add an #ifndef around the if so the current behavior can be switched from the site.h header (#ifndef to get sin6_scope_id in all cases by default).