From 77ff6022fa30005f8e965c42064e0274d329b6c0 Mon Sep 17 00:00:00 2001 From: Clemens Gruber Date: Wed, 18 May 2016 01:34:25 +0200 Subject: networkd: Add EmitRouter= option for DHCP Server (#3251) 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. Signed-off-by: Clemens Gruber --- src/libsystemd-network/dhcp-server-internal.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/libsystemd-network/dhcp-server-internal.h') diff --git a/src/libsystemd-network/dhcp-server-internal.h b/src/libsystemd-network/dhcp-server-internal.h index adb557167a..0c76956fad 100644 --- a/src/libsystemd-network/dhcp-server-internal.h +++ b/src/libsystemd-network/dhcp-server-internal.h @@ -63,6 +63,8 @@ struct sd_dhcp_server { struct in_addr *ntp, *dns; unsigned n_ntp, n_dns; + bool emit_router; + Hashmap *leases_by_client_id; DHCPLease **bound_leases; DHCPLease invalid_lease; -- cgit v1.2.3-54-g00ecf