Remove the RA's before reporting no carrier.

This commit is contained in:
Roy Marples 2012-01-29 16:49:04 +00:00
parent b1a20121fb
commit 70b967d7d7

View File

@ -912,13 +912,13 @@ handle_carrier(int action, int flags, const char *ifname)
syslog(LOG_INFO, "%s: carrier lost", iface->name);
close_sockets(iface);
delete_timeouts(iface, start_expire, NULL);
drop_dhcp(iface, "NOCARRIER");
if (iface->ras) {
ipv6rs_free(iface);
iface->ras = NULL;
iface->state->reason = "ROUTERADVERT";
run_script(iface);
}
drop_dhcp(iface, "NOCARRIER");
}
} else if (carrier == 1 && !(~iface->flags & (IFF_UP | IFF_RUNNING))) {
if (iface->carrier != LINK_UP) {