]> git.ipfire.org Git - thirdparty/systemd.git/commit
sd-dhcp-relay: introduce new DHCP relay agent
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 28 Apr 2026 04:27:43 +0000 (13:27 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 21 May 2026 07:55:58 +0000 (16:55 +0900)
commit06ce0f90a57e35f9fbbbe4dff15ae5ae17381034
treea8e96faecf7140ad234734d5fa2723d6c5f9cd45
parent9f25feb4ed18bb3d1e21de932279b2b1b3098846
sd-dhcp-relay: introduce new DHCP relay agent

Previously, sd-dhcp-server can be run as a DHCP relay agent.
But, DHCP server and DHCP relay agent behave completely differently,
hence there is almost no code that can be shared between the two modes.
Let's split out the DHCP relay agent feature from sd-dhcp-server.

The new DHCP relay agent supports:
- multiple upstream and downstream interfaces,
- gateway address (giaddr field in DHCP message header) is configurable,
- supports more DHCP relay agent information sub-options,
- each interface has their own socket fd, and each socket is bound to
  the interface, so that we can enable/disable each interface
  safely without affecting other interfaces, and we can filter out any
  unexpected packets from unmanaged interfaces,

networkd integration and test cases will be added later.
src/libsystemd-network/dhcp-relay-downstream.c [new file with mode: 0644]
src/libsystemd-network/dhcp-relay-interface.c [new file with mode: 0644]
src/libsystemd-network/dhcp-relay-internal.h [new file with mode: 0644]
src/libsystemd-network/dhcp-relay-upstream.c [new file with mode: 0644]
src/libsystemd-network/meson.build
src/libsystemd-network/sd-dhcp-relay.c [new file with mode: 0644]
src/libsystemd/sd-common/sd-forward.h
src/systemd/meson.build
src/systemd/sd-dhcp-relay.h [new file with mode: 0644]