dhcp_configuration: SendHostname is valid for v4 and v6

We should present this option for both DHCP types as systemd supports it
for both. It would be surprising to an end user if DHCPv6 just ate this
option without passing it along.

Change-Id: I7ae046c0a92ab199e2026ffe3dfb78b8763223a0
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/src/dhcp_configuration.cpp b/src/dhcp_configuration.cpp
index 149dd60..1e4e999 100644
--- a/src/dhcp_configuration.cpp
+++ b/src/dhcp_configuration.cpp
@@ -53,11 +53,8 @@
     ConfigIntf::dnsEnabled(getDHCPProp(conf, type, "UseDNS"), true);
     ConfigIntf::ntpEnabled(getDHCPProp(conf, type, "UseNTP"), true);
     ConfigIntf::hostNameEnabled(getDHCPProp(conf, type, "UseHostname"), true);
-    if (type == DHCPType::v4)
-    {
-        ConfigIntf::sendHostNameEnabled(getDHCPProp(conf, type, "SendHostname"),
-                                        true);
-    }
+    ConfigIntf::sendHostNameEnabled(getDHCPProp(conf, type, "SendHostname"),
+                                    true);
 
     emit_object_added();
 }
diff --git a/src/ethernet_interface.cpp b/src/ethernet_interface.cpp
index 5aae789..f49cb24 100644
--- a/src/ethernet_interface.cpp
+++ b/src/ethernet_interface.cpp
@@ -775,6 +775,8 @@
         dhcp6["UseDomains"].emplace_back(tfStr(dhcp6Conf->domainEnabled()));
         dhcp6["UseNTP"].emplace_back(tfStr(dhcp6Conf->ntpEnabled()));
         dhcp6["UseHostname"].emplace_back(tfStr(dhcp6Conf->hostNameEnabled()));
+        dhcp6["SendHostname"].emplace_back(
+            tfStr(dhcp6Conf->sendHostNameEnabled()));
     }
     auto path = config::pathForIntfConf(manager.get().getConfDir(),
                                         interfaceName());