#else
if (!find_route6(routes, rt))
#endif
+ {
r = del_route6(rt);
+ /* If the subnet route didn't exist, don't
+ * moan about it.
+ * We currently do this to silence FreeBSD-7 */
+ if (r == -1 && errno == ESRCH)
+ r = 0;
+ }
free(rt);
}
return r;
ifp->name, ap->saddr);
if (add_address6(ifp, ap) == -1)
syslog(LOG_ERR, "add_address6 %m");
- else if (ipv6_remove_subnet(rap, ap) == -1)
- syslog(LOG_ERR, "ipv6_remove_subnet %m");
- else
+ else {
+ if (ipv6_remove_subnet(rap, ap) == -1)
+ syslog(LOG_ERR,"ipv6_remove_subnet %m");
syslog(LOG_DEBUG,
"%s: vltime %d seconds, pltime %d seconds",
ifp->name, ap->prefix_vltime,
ap->prefix_pltime);
+ }
}
}
if (!(options & DHCPCD_TEST))