* prefer the interface.
* This also has the nice side effect of flushing ARP entries so
* we don't have to do that manually. */
- ipv4_deleteroute(ort);
+ if (ipv4_deleteroute(ort) == -1 && errno != ESRCH)
+ syslog(LOG_ERR, "%s: ipv4_deleteroute: %m", ort->iface->name);
if (!ipv4_addroute(nrt))
return 0;
syslog(LOG_ERR, "%s: ipv4_addroute: %m", nrt->iface->name);
desc_route(add ? "adding" : "changing", nrt);
/* We delete and add the route so that we can change metric and
* prefer the interface. */
- del_route6(ort);
+ if (del_route6(ort) == -1 && errno != ESRCH)
+ syslog(LOG_ERR, "%s: del_route6: %m", ort->iface->name);
if (add_route6(nrt) == 0)
return 0;
syslog(LOG_ERR, "%s: add_route6: %m", nrt->iface->name);