From 90c58aba9ce89da629e999268019a95507fd1913 Mon Sep 17 00:00:00 2001 From: florian Date: Sat, 20 Nov 2021 17:54:40 +0000 Subject: [PATCH] Send default client identifier when a config file is present but no client identifier is configured like the man page claims we would do. Problem found and patch by Joel Knight (knight.joel AT gmail), thanks! --- sbin/dhcpleased/frontend.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sbin/dhcpleased/frontend.c b/sbin/dhcpleased/frontend.c index 5131dce1471..bd1e37fe952 100644 --- a/sbin/dhcpleased/frontend.c +++ b/sbin/dhcpleased/frontend.c @@ -1,4 +1,4 @@ -/* $OpenBSD: frontend.c,v 1.23 2021/10/20 07:04:49 florian Exp $ */ +/* $OpenBSD: frontend.c,v 1.24 2021/11/20 17:54:40 florian Exp $ */ /* * Copyright (c) 2017, 2021 Florian Obser @@ -946,6 +946,10 @@ build_packet(uint8_t message_type, char *if_name, uint32_t xid, /* XXX check space */ memcpy(p, iface_conf->c_id, iface_conf->c_id_len); p += iface_conf->c_id_len; + } else { + memcpy(dhcp_client_id + 3, hw_address, sizeof(*hw_address)); + memcpy(p, dhcp_client_id, sizeof(dhcp_client_id)); + p += sizeof(dhcp_client_id); } if (iface_conf->vc_id_len > 0) { /* XXX check space */ -- 2.20.1