From 1943aab603645c799795b16f6c64ad18bfd72339 Mon Sep 17 00:00:00 2001 From: kn Date: Thu, 8 Apr 2021 17:29:17 +0000 Subject: [PATCH] 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 about a default route not being set when requesting the "classless-static-routes" dhcp-options(5) from dhcpd(8), thanks! OK florian --- sbin/dhcpleased/frontend.c | 6 +++--- 1 file 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 @@ -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, -- 2.20.1