From cba03871a379153d57419ea560ba259560bf0e1b Mon Sep 17 00:00:00 2001 From: Antoine Prieels Date: Tue, 26 May 2020 11:40:48 +0000 Subject: [PATCH] [FIX] point_of_sale: IoT Box Changing IP After each reboot, the IP address of the IoT Boxes changed. The problem was due to the fact that the UID that was sent to the DHCP server was sometimes different after the box had been rebooted. The UID was saved to `/var/lib/dhcpcd5/duid`, which was deleted after every reboot. The UID then had to be recomputed. This UID contains a timestamp, which was sometimes off by 1-2 seconds from one boot to the other. The lease was then not found on the DHCP server and a new one was created, with a new IP address. We replace the UID by the clientID, which is not dependent on the time but only on the MAC address of the IoT Box. closes odoo/odoo#51889 Signed-off-by: pimodoo --- .../tools/posbox/overwrite_after_init/etc/dhcpcd.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/point_of_sale/tools/posbox/overwrite_after_init/etc/dhcpcd.conf b/addons/point_of_sale/tools/posbox/overwrite_after_init/etc/dhcpcd.conf index 22698cb46ba..7b693ddc8fd 100644 --- a/addons/point_of_sale/tools/posbox/overwrite_after_init/etc/dhcpcd.conf +++ b/addons/point_of_sale/tools/posbox/overwrite_after_init/etc/dhcpcd.conf @@ -11,7 +11,7 @@ hostname #clientid # or # Use the same DUID + IAID as set in DHCPv6 for DHCPv4 ClientID as per RFC4361. -duid +clientid # Persist interface configuration when dhcpcd exits. persistent