]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
DHCP6: Don't reboot when not doing DHCPv6
authorRoy Marples <roy@marples.name>
Tue, 11 Mar 2025 12:02:41 +0000 (12:02 +0000)
committerRoy Marples <roy@marples.name>
Tue, 11 Mar 2025 12:02:41 +0000 (12:02 +0000)
For #437 and #478.

src/dhcpcd.c

index 1b1e1b2fd4326bb088e83e5a911e535080628c77..4835fef000fa715e446865b8d7d62c4399b7cff9 100644 (file)
@@ -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);
 }