shill: Add ArpGateway and network-based leases
Add two arguments to the DHCP client:
- Turn on ArpGateway (ARP for default gateway in order to test validity
of lease) by default, and use the same manager flag as flimflam did.
- Use per-network lease files for Ethernet and WiFi. This means that
multiple leases can be held in parallel for different Ethernet devices
and WiFi SSIDs.
Bonus changes: Fix DHCP lease filename template which was broken in flimflam
and ported with full fidelity to shill. Make removal of old lease files
conditional on whether the lease file was non-default.
BUG=chromium-os:25717,chromium-os:16885
TEST=New unit tests + manual: Ensure dhcpcd runs with correct arguments ("-R"
added when ArpGateway is enabled on the manager, no "-R" otherwise), and that
the "set_arpgw" command in crosh works correctly. Monitor dhcpcd command line
for new lease suffix parameter, and ensure that leases are being written out
to those files, and that the files are not being removed on program exit.
CQ-DEPEND=Iac282c1686695239a790bbcc0d110c6a69bf45e0
Change-Id: I68bb3cbd18c95f01003eaf049fa60aad446f8116
Reviewed-on: https://gerrit.chromium.org/gerrit/22065
Commit-Ready: Paul Stewart <pstew@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
diff --git a/doc/manager-api.txt b/doc/manager-api.txt
index 93c2132..3ce8db4 100644
--- a/doc/manager-api.txt
+++ b/doc/manager-api.txt
@@ -273,6 +273,15 @@
Object path of the current active profile.
+ boolean ArpGateway [readwrite]
+
+ Specifies whether the DHCP client should be
+ configured to perform the extra step of performing
+ an ARP of the gateway IP address. This provides
+ a level of assurance that the issued IP address is
+ valid and not blocked in some manner unknown by the
+ DHCP server.
+
array{string} AvailableTechnologies [readonly]
The list of available technologies. The strings