networkd: Add EmitDNS and EmitDomains configuration options
authorPatrik Flykt <patrik.flykt@linux.intel.com>
Fri, 29 Sep 2017 08:10:19 +0000 (11:10 +0300)
committerPatrik Flykt <patrik.flykt@linux.intel.com>
Fri, 6 Oct 2017 09:30:27 +0000 (12:30 +0300)
Add EmitDNS= and EmitDomains= options to the IPv6PrefixDelegation
network configuration file section so that sending DNS servers
and DNS search domains can be configured independent of each other.

The default values for both are set to true.

src/network/networkd-network-gperf.gperf
src/network/networkd-network.c
src/network/networkd-network.h

index af39d77..ca0d67e 100644 (file)
@@ -152,7 +152,9 @@ IPv6PrefixDelegation.RouterLifetimeSec, config_parse_sec,
 IPv6PrefixDelegation.Managed,           config_parse_bool,                              0,                             offsetof(Network, router_managed)
 IPv6PrefixDelegation.OtherInformation,  config_parse_bool,                              0,                             offsetof(Network, router_other_information)
 IPv6PrefixDelegation.RouterPreference,  config_parse_router_preference,                 0,                             0
+IPv6PrefixDelegation.EmitDNS,           config_parse_bool,                              0,                             offsetof(Network, router_emit_dns)
 IPv6PrefixDelegation.DNS,               config_parse_radv_dns,                          0,                             0
+IPv6PrefixDelegation.EmitDomains,       config_parse_bool,                              0,                             offsetof(Network, router_emit_domains)
 IPv6PrefixDelegation.Domains,           config_parse_radv_search_domains,               0,                             0
 IPv6PrefixDelegation.DNSLifetimeSec,    config_parse_sec,                               0,                             offsetof(Network, router_dns_lifetime_usec)
 IPv6Prefix.Prefix,                      config_parse_prefix,                            0,                             0
index 3a7eb2c..bf54a57 100644 (file)
@@ -233,6 +233,9 @@ static int network_load_one(Manager *manager, const char *filename) {
         network->dhcp_server_emit_router = true;
         network->dhcp_server_emit_timezone = true;
 
+        network->router_emit_dns = true;
+        network->router_emit_domains = true;
+
         network->use_bpdu = true;
         network->allow_port_to_be_root = true;
         network->unicast_flood = true;
index 9fb0eae..500325f 100644 (file)
@@ -167,6 +167,8 @@ struct Network {
         uint8_t router_preference;
         bool router_managed;
         bool router_other_information;
+        bool router_emit_dns;
+        bool router_emit_domains;
         usec_t router_dns_lifetime_usec;
         struct in6_addr *router_dns;
         unsigned n_router_dns;