]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
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 af39d77ce9bf02a1e828d2fbcfcc02fce683397d..ca0d67e3d2ce706cc38cadfd6f91e222da8d4ba0 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 3a7eb2c2a8a873bf0afd64521ab85331dc58ba57..bf54a57f3bec3e5034c1b512cef6c6ba9ff35a9a 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 9fb0eae38013e0c09758b5960005590227a403d6..500325fbd014f62e48164e247304ad419e2bb452 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;