networkd: Add EmitRouter= option for DHCP Server (#3251)

System Internals / systemd - Clemens Gruber [gmail.com] - 17 May 2016 18:34 UTC

Add an option to disable appending DHCP option 3 (Router) to the DHCP OFFER and ACK packets. This commit adds the boolean option EmitRouter= for the [DHCPServer] section in .network files.

Rationale: On embedded devices, it is very useful to have a DHCP server running on an USB OTG ethernet gadget interface to avoid manual setup on the client PCs, but it should only serve IP addresses, no route(r)s. Otherwise, Windows clients experience network connectivity issues, due to them using the address set in DHCP option 3 as default gateway.

77ff602 networkd: Add EmitRouter= option for DHCP Server (#3251)
NEWS | 32 ++++++++++++++-----------
man/systemd.network.xml | 10 ++++++++
src/libsystemd-network/dhcp-server-internal.h | 2 ++
src/libsystemd-network/sd-dhcp-server.c | 31 +++++++++++++++++-------
src/network/networkd-link.c | 6 +++++
src/network/networkd-network-gperf.gperf | 1 +
src/network/networkd-network.c | 1 +
src/network/networkd-network.h | 1 +
src/systemd/sd-dhcp-server.h | 1 +
9 files changed, 63 insertions(+), 22 deletions(-)

Upstream: github.com


  • Share