Revert "shill: Update dhcpcd command line parameters"
This reverts commit 2dacc0e625be7327aa3802605ec17e5ecf47a2b8.
Reason for revert: Causing IPs to be unexpectedly renewed
Original change's description:
> shill: Update dhcpcd command line parameters
>
> Dhcpcd upgraded to 7.2.5 no longer have '-P' command line parameter
> available for our modifications so use the longer ('--unicast') version
> of it.
>
> BUG=b:172213156, b:180714237,b:180714179
> TEST=build, deploy, restart shill and check if lease is properly
> obtained
>
> Cq-Depend: chromium:2877613
> Change-Id: I3be933efb50bfdb9931340b464ec8b76155efe5f
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform2/+/2874144
> Reviewed-by: Hugo Benichi <hugobenichi@google.com>
> Commit-Queue: Hugo Benichi <hugobenichi@google.com>
> Tested-by: Hugo Benichi <hugobenichi@google.com>
Bug: b:172213156, b:180714237,b:180714179, b:195887306, b:196362209, b:196798214
Cq-Depend: chromium:3098663
Change-Id: If604619fb9743e2c845853008b9e032edf70bfeb
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform2/+/3098710
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Tested-by: Raul E Rangel <rrangel@chromium.org>
Auto-Submit: Raul E Rangel <rrangel@chromium.org>
Commit-Queue: Hugo Benichi <hugobenichi@google.com>
Reviewed-by: Hugo Benichi <hugobenichi@google.com>
diff --git a/shill/dhcp/dhcpv4_config.cc b/shill/dhcp/dhcpv4_config.cc
index 99a3933..b1ccf79 100644
--- a/shill/dhcp/dhcpv4_config.cc
+++ b/shill/dhcp/dhcpv4_config.cc
@@ -6,8 +6,6 @@
#include <arpa/inet.h>
-#include <utility>
-
#include <base/check.h>
#include <base/files/file_util.h>
#include <base/logging.h>
@@ -234,7 +232,7 @@
if (arp_gateway_) {
flags.push_back("-R"); // ARP for default gateway.
- flags.push_back("--unicast"); // Enable unicast ARP on renew.
+ flags.push_back("-P"); // Enable unicast ARP on renew.
}
return flags;
}
diff --git a/shill/dhcp/dhcpv4_config_test.cc b/shill/dhcp/dhcpv4_config_test.cc
index d4bf40b..ac77e0e 100644
--- a/shill/dhcp/dhcpv4_config_test.cc
+++ b/shill/dhcp/dhcpv4_config_test.cc
@@ -331,7 +331,7 @@
}
if (has_arp_gateway) {
- if (arg[end_offset] != "-R" || arg[end_offset + 1] != "--unicast") {
+ if (arg[end_offset] != "-R" || arg[end_offset + 1] != "-P") {
return false;
}
end_offset += 2;