From e8b2c8f29aa9d9ceaa14a7951935c662dc8af307 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Tue, 11 Mar 2025 12:02:41 +0000 Subject: [PATCH] DHCP6: Don't reboot when not doing DHCPv6 For #437 and #478. --- src/dhcpcd.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/dhcpcd.c b/src/dhcpcd.c index 1b1e1b2f..4835fef0 100644 --- a/src/dhcpcd.c +++ b/src/dhcpcd.c @@ -1316,10 +1316,12 @@ if_reboot(struct interface *ifp, int argc, char **argv) script_runreason(ifp, "RECONFIGURE"); dhcpcd_initstate1(ifp, argc, argv, 0); #ifdef INET - dhcp_reboot_newopts(ifp, oldopts); + if (ifp->options->options & DHCPCD_DHCP) + dhcp_reboot_newopts(ifp, oldopts); #endif #ifdef DHCP6 - dhcp6_reboot(ifp); + if (ifp->options->options & DHCPCD_DHCP6) + dhcp6_reboot(ifp); #endif dhcpcd_prestartinterface(ifp); } -- 2.47.2