shill: fix passing host name property to DHCP v4 request
replaced the "HostName" property in the Manager interface with a new
"DHCPProperty.Hostname" property. However, the migration was partially
done. The Manager.SetProperty D-Bus API still accepts the deprecated
HostName property but not the DHCPProperty.Hostname property. Also, the
DHCPProperty.Hostname property is not stored to or loaded from the
default profile. When merging the DHCP properties held by Manager and a
service, the host name isn't propagated correctly, which results in
shill not passing the `-h <hostname>` option to dhcpcd under IPv4.
TEST=Tested the following:
1. Set the DHCPProperty.Hostname property
dbus-send --system --print-reply \
--dest=org.chromium.flimflam / org.chromium.flimflam.Manager.SetProperty \
2. Restart shill
3. Verify that DHCPProperty.HostName=test-hostname is set in the global
section of /var/cache/shill/default.profile.
4. Connect the device to Ethernet.
5. Verify that dhcpcd is running with `-h test-hostname` option.
Commit-Ready: Ben Chan <email@example.com>
Tested-by: Ben Chan <firstname.lastname@example.org>
Reviewed-by: Steven Bennetts <email@example.com>
2 files changed