{
struct interface *ifp0;
- TAILQ_FOREACH(ifp0, ifaces, next) {
- if (ifp0 != ifp)
- dhcp6_freedrop_addrs(ifp0, 1, ifp);
+ if (ifaces) {
+ TAILQ_FOREACH(ifp0, ifaces, next) {
+ if (ifp0 != ifp)
+ dhcp6_freedrop_addrs(ifp0, 1, ifp);
+ }
}
}
* the same name or index so think very hard before changing
* this.
*/
- if (ifp->options->options & (DHCPCD_STOPPING | DHCPCD_RELEASE))
+ if (ifp->options &&
+ ifp->options->options & (DHCPCD_STOPPING | DHCPCD_RELEASE))
dhcp6_delete_delegates(ifp);
state = D6_STATE(ifp);