Skip to content

Commit e8b2c8f

Browse files
committed
DHCP6: Don't reboot when not doing DHCPv6
For #437 and #478.
1 parent 7dfeb36 commit e8b2c8f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/dhcpcd.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1316,10 +1316,12 @@ if_reboot(struct interface *ifp, int argc, char **argv)
13161316
script_runreason(ifp, "RECONFIGURE");
13171317
dhcpcd_initstate1(ifp, argc, argv, 0);
13181318
#ifdef INET
1319-
dhcp_reboot_newopts(ifp, oldopts);
1319+
if (ifp->options->options & DHCPCD_DHCP)
1320+
dhcp_reboot_newopts(ifp, oldopts);
13201321
#endif
13211322
#ifdef DHCP6
1322-
dhcp6_reboot(ifp);
1323+
if (ifp->options->options & DHCPCD_DHCP6)
1324+
dhcp6_reboot(ifp);
13231325
#endif
13241326
dhcpcd_prestartinterface(ifp);
13251327
}

0 commit comments

Comments
 (0)