summaryrefslogtreecommitdiff
path: root/src/network/networkd-network.c
diff options
context:
space:
mode:
authorEugene Yakubovich <eugene.yakubovich@coreos.com>2014-07-01 11:58:49 -0700
committerTom Gundersen <teg@jklm.no>2014-07-01 22:02:25 +0200
commit4cc7a82c9490a3c5ae03b1d6d168ce40ba499e23 (patch)
tree0b806eddc7563072cb1398ae602ced46ee840b4c /src/network/networkd-network.c
parent0a8a0fad010018be0f46d1c2e077ade0eb27c7db (diff)
networkd: send hostname to dhcp server
Send hostname (option 12) in DISCOVER and REQUEST messages so the DHCP server could use it to register with dynamic DNS and such. To opt-out of this behaviour set SendHostname to false in [DHCP] section of .network file [tomegun: rebased, made sure a failing set_hostname is a noop and moved config from DHCPv4 to DHCP]
Diffstat (limited to 'src/network/networkd-network.c')
-rw-r--r--src/network/networkd-network.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c
index f60f7c812c..9ab4f23068 100644
--- a/src/network/networkd-network.c
+++ b/src/network/networkd-network.c
@@ -90,6 +90,7 @@ static int network_load_one(Manager *manager, const char *filename) {
network->dhcp_hostname = true;
network->dhcp_domainname = true;
network->dhcp_routes = true;
+ network->dhcp_sendhost = true;
r = config_parse(NULL, filename, file, "Match\0Network\0Address\0Route\0DHCPv4\0", config_item_perf_lookup,
(void*) network_network_gperf_lookup, false, false, network);