From 08d8f476b6aa0d701b20cda5f706db853ade1911 Mon Sep 17 00:00:00 2001 From: Martin Schiller Date: Fri, 31 Mar 2017 08:31:39 +0200 Subject: interface: add new "ifup-failed" hotplug event This hook makes it possible to do some helper work in hotplug scripts when a connection is not established successfully. example: try several username/passwords from a pool to establish a pppoe or wwan connection by replacing the configured values of the connection in a hotplug script. Signed-off-by: Martin Schiller --- interface-event.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'interface-event.c') diff --git a/interface-event.c b/interface-event.c index 4976c2c..86e8f54 100644 --- a/interface-event.c +++ b/interface-event.c @@ -33,6 +33,7 @@ static struct uloop_process task = { static const char * const eventnames[] = { [IFEV_DOWN] = "ifdown", [IFEV_UP] = "ifup", + [IFEV_UP_FAILED] = "ifup-failed", [IFEV_UPDATE] = "ifupdate", [IFEV_FREE] = "free", [IFEV_RELOAD] = "reload", @@ -191,6 +192,7 @@ static void interface_event_cb(struct interface_user *dep, struct interface *ifa switch (ev) { case IFEV_LINK_UP: case IFEV_UP: + case IFEV_UP_FAILED: case IFEV_UPDATE: case IFEV_DOWN: interface_queue_event(iface, ev); -- cgit v1.2.1