summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Obser <florian@cvs.openbsd.org>2021-11-20 17:54:41 +0000
committerFlorian Obser <florian@cvs.openbsd.org>2021-11-20 17:54:41 +0000
commit6e85cf34cd955ed1668642c4e2860d7086ab27ff (patch)
treeda8717689cb949f42399f77fe7190d29e3db577b
parentd9258528c8eea557ef4f8400acfbf0461950b7ea (diff)
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!
-rw-r--r--sbin/dhcpleased/frontend.c6
1 files changed, 5 insertions, 1 deletions
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 <florian@openbsd.org>
@@ -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 */