summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
Diffstat (limited to 'src/network')
-rw-r--r--src/network/networkd-link.c6
-rw-r--r--src/network/networkd-network-gperf.gperf1
-rw-r--r--src/network/networkd-network.c1
-rw-r--r--src/network/networkd-network.h1
4 files changed, 9 insertions, 0 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index f3a79b0ec8..16a3609a0b 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -1020,6 +1020,12 @@ static int link_enter_set_addresses(Link *link) {
log_link_warning_errno(link, r, "Failed to set NTP server for DHCP server, ignoring: %m");
}
+ r = sd_dhcp_server_set_emit_router(link->dhcp_server, link->network->dhcp_server_emit_router);
+ if (r < 0) {
+ log_link_warning_errno(link, r, "Failed to set router emission for DHCP server: %m");
+ return r;
+ }
+
if (link->network->dhcp_server_emit_timezone) {
_cleanup_free_ char *buffer = NULL;
const char *tz = NULL;
diff --git a/src/network/networkd-network-gperf.gperf b/src/network/networkd-network-gperf.gperf
index 4425ee4e2f..03e4e3b39f 100644
--- a/src/network/networkd-network-gperf.gperf
+++ b/src/network/networkd-network-gperf.gperf
@@ -95,6 +95,7 @@ DHCPServer.EmitDNS, config_parse_bool,
DHCPServer.DNS, config_parse_dhcp_server_dns, 0, 0
DHCPServer.EmitNTP, config_parse_bool, 0, offsetof(Network, dhcp_server_emit_ntp)
DHCPServer.NTP, config_parse_dhcp_server_ntp, 0, 0
+DHCPServer.EmitRouter, config_parse_bool, 0, offsetof(Network, dhcp_server_emit_router)
DHCPServer.EmitTimezone, config_parse_bool, 0, offsetof(Network, dhcp_server_emit_timezone)
DHCPServer.Timezone, config_parse_timezone, 0, offsetof(Network, dhcp_server_timezone)
DHCPServer.PoolOffset, config_parse_uint32, 0, offsetof(Network, dhcp_server_pool_offset)
diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c
index 206c270e50..dd89b3770c 100644
--- a/src/network/networkd-network.c
+++ b/src/network/networkd-network.c
@@ -113,6 +113,7 @@ static int network_load_one(Manager *manager, const char *filename) {
network->dhcp_server_emit_dns = true;
network->dhcp_server_emit_ntp = true;
+ network->dhcp_server_emit_router = true;
network->dhcp_server_emit_timezone = true;
network->use_bpdu = true;
diff --git a/src/network/networkd-network.h b/src/network/networkd-network.h
index 4cd0fa4ab8..91099161ce 100644
--- a/src/network/networkd-network.h
+++ b/src/network/networkd-network.h
@@ -127,6 +127,7 @@ struct Network {
bool dhcp_server_emit_ntp;
struct in_addr *dhcp_server_ntp;
unsigned n_dhcp_server_ntp;
+ bool dhcp_server_emit_router;
bool dhcp_server_emit_timezone;
char *dhcp_server_timezone;
usec_t dhcp_server_default_lease_time_usec, dhcp_server_max_lease_time_usec;