]> git.ipfire.org Git - thirdparty/systemd.git/commit
network: add DHCP server domain name option support (#39260)
authorGovind Venugopal <gvenugo3@asu.edu>
Wed, 15 Oct 2025 09:20:41 +0000 (02:20 -0700)
committerGitHub <noreply@github.com>
Wed, 15 Oct 2025 09:20:41 +0000 (11:20 +0200)
commit3eb7b881bd7e5ebe54910fe343d0ee0963879aab
tree51336e966bbd06319a86e1d91383a5b4a0ff4fe1
parent4cae0e9a78fec2e0787e70c795da1bbf8c135ad4
network: add DHCP server domain name option support (#39260)

Implements DHCP option 15 (Domain Name) for systemd-networkd's DHCP
server, allowing administrators to configure the DNS default domain that
clients should use.

This addresses the feature request in issue #37077, where users needed
to manually configure domain names using
SendOption=15:string:example.com as a workaround.

This adds two new configuration options to the [DHCPServer] section:
- EmitDomain= (boolean): whether to send domain name to clients
- Domain= (string): the domain name to send (e.g., "example.com")

Example configuration:
  [DHCPServer] EmitDomain=yes Domain=example.com

This eliminates the need for manual workarounds using
SendOption=15:string:...

Fixes #37077
man/systemd.network.xml
src/libsystemd-network/dhcp-server-internal.h
src/libsystemd-network/sd-dhcp-server.c
src/libsystemd-network/test-dhcp-server.c
src/network/networkd-dhcp-server.c
src/network/networkd-network-gperf.gperf
src/network/networkd-network.c
src/network/networkd-network.h
src/systemd/sd-dhcp-server.h