.params = iface_attrs,
};
+static void
+set_config_state(struct interface *iface, enum interface_config_state s);
+
static void
interface_error_flush(struct interface *iface)
{
interface_proto_event(iface->proto, PROTO_CMD_TEARDOWN, force);
if (force)
interface_flush_state(iface);
-
- if (iface->dynamic)
- vlist_delete(&interfaces, &iface->node);
break;
case IFS_DOWN:
}
if (iface->autostart && iface->available)
interface_set_up(iface);
+ else if (iface->dynamic)
+ set_config_state(iface, IFC_REMOVE);
}
static void
-interface_proto_cb(struct interface_proto_state *state, enum interface_proto_event ev)
+interface_proto_event_cb(struct interface_proto_state *state, enum interface_proto_event ev)
{
struct interface *iface = state->iface;
if (!state)
return;
- state->proto_event = interface_proto_cb;
+ state->proto_event = interface_proto_event_cb;
state->iface = iface;
}