summaryrefslogtreecommitdiff
path: root/sbin/dhcpleased
diff options
context:
space:
mode:
authorkn <kn@cvs.openbsd.org>2021-04-08 17:29:18 +0000
committerkn <kn@cvs.openbsd.org>2021-04-08 17:29:18 +0000
commit6cab9b8bf21044eafaab8de442edfda8f51541a7 (patch)
tree48cad3fcca302685cd737c81e430d3db6ecfc288 /sbin/dhcpleased
parent6ddaa7b10b5896281cff32c9f593d12ce536ceba (diff)
Do not request unused "classless-static-routes" dhcp-options(5)
Doing so implies support for it, but dhcpleased(8) currently ingores it entirely and does not configure any route from it. As per RFC 3442 servers SHOULD NOT respond with a "routers" option when "classless-static-routes" is set. dhcpd(8)/dhcpd.conf(5) follows that, hence requesting but not using static routes results in not installing any routes at all. Stop signaling support for this option and only request "routers" such that dhcpleased continues to install a default route and properly ignores the unsupported option if used by the server. Report from Uwe Werler <uwe @ werler dot is> about a default route not being set when requesting the "classless-static-routes" dhcp-options(5) from dhcpd(8), thanks! OK florian
Diffstat (limited to 'sbin/dhcpleased')
-rw-r--r--sbin/dhcpleased/frontend.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/dhcpleased/frontend.c b/sbin/dhcpleased/frontend.c
index 76313923dc8..349055f25c1 100644
--- a/sbin/dhcpleased/frontend.c
+++ b/sbin/dhcpleased/frontend.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: frontend.c,v 1.8 2021/03/22 16:28:25 florian Exp $ */
+/* $OpenBSD: frontend.c,v 1.9 2021/04/08 17:29:17 kn Exp $ */
/*
* Copyright (c) 2017, 2021 Florian Obser <florian@openbsd.org>
@@ -776,9 +776,9 @@ build_packet(uint8_t message_type, uint32_t xid, struct ether_addr *hw_address,
static uint8_t dhcp_client_id[] = {DHO_DHCP_CLIENT_IDENTIFIER, 7,
HTYPE_ETHER, 0, 0, 0, 0, 0, 0};
static uint8_t dhcp_req_list[] = {DHO_DHCP_PARAMETER_REQUEST_LIST,
- 8, DHO_SUBNET_MASK, DHO_ROUTERS, DHO_DOMAIN_NAME_SERVERS,
+ 7, DHO_SUBNET_MASK, DHO_ROUTERS, DHO_DOMAIN_NAME_SERVERS,
DHO_HOST_NAME, DHO_DOMAIN_NAME, DHO_BROADCAST_ADDRESS,
- DHO_DOMAIN_SEARCH, DHO_CLASSLESS_STATIC_ROUTES};
+ DHO_DOMAIN_SEARCH};
static uint8_t dhcp_requested_address[] = {DHO_DHCP_REQUESTED_ADDRESS,
4, 0, 0, 0, 0};
static uint8_t dhcp_server_identifier[] = {DHO_DHCP_SERVER_IDENTIFIER,