summaryrefslogtreecommitdiff
path: root/interface-event.c
Commit message (Collapse)AuthorAgeFilesLines
* netifd: Do not return values in void functionHauke Mehrtens2023-02-191-2/+4
| | | | | | These two functions return void, do not try to return a parameter. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* Introduce new interface event "create" (IFEV_CREATE)Alexander Couzens2018-07-051-0/+1
| | | | | | | "create" will be called before the proto handlers initialised. Acked-by: Hans Dedecker <dedeckeh@gmail.com> Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
* interface: add new "ifup-failed" hotplug eventMartin Schiller2017-05-091-0/+2
| | | | | | | | | | | 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 <ms@dev.tdt.de>
* interface-event: Don't dequeue hotplug event in case of interface reload eventHans Dedecker2016-09-141-1/+2
| | | | | | | | | | | | | | Dropping hotplug event in case of interface reload results into hotplug scripts not being being run for the interface and thus external actors not being informed about the actual state of the interface. This is clearly visible if the interface auto parameter is set to disabled for multiple interfaces resulting into no hotplug down event for all interfaces. Therefore don't flush the interface hotplug queue in case an interface reload event is observed. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* interface: do not process hotplug events for link up eventFelix Fietkau2016-07-291-0/+4
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* interface: report link up events for force_link interfacesFelix Fietkau2016-07-291-1/+9
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* interface-event: Fix possible out of bounds array accessHans Dedecker2016-02-011-1/+1
| | | | | | | The array eventnames is of size 3 while the interface_event type may use the indexes 3 or 4. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* netifd: Fix possible hotplug race conditionsHans Dedecker2015-02-171-15/+4
| | | | | | | | | | | | Don't drop ifup/ifdown events in case an interface event is cached as it leads to possible race conditions (eg firewall not being reloaded as ifup is dropped) when multiple interface events are fired in a short timeframe (eg multiple PPP link flaps). Always overwrite the cached interface event except for the interface update event so the hotplug scripts are launched with the last known status. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* Set DEVICE for legacy ifupdate event as wellSteven Barth2014-07-231-1/+1
| | | | Signed-off-by: Steven Barth <steven@midlink.org>
* interface-event: make eventnames static and constFelix Fietkau2014-04-261-1/+1
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* netifd: Rework hotplug event queueing in case of congestionHans Dedecker2014-04-261-15/+58
| | | | | | | | | | | In case of event congestion (e.g. when several interfaces become active in a short notice) : -hotplug events will be handled on a first come first served basis (before it was lifo) -drop a new ifupdate event in favour of an already queued ifup event (before the ifup event was overwritten by the ifupdate event resulting in some hotplug scripts "missing" the ifup event) Additonal the event flow has been documented Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> Signed-off-by: Joeri Barbarien <joeri.barbarien@gmail.com>
* Add indicator-flags to ubus and hotplug update-eventsSteven Barth2014-01-171-2/+15
|
* utils: add a function for checking if a process given by pid is still aliveFelix Fietkau2013-10-221-1/+0
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* Fix ifupdate eventsSteven Barth2013-10-191-2/+2
|
* Add protocol update notifications and hotplug legacy callsSteven Barth2013-10-171-4/+10
|
* fix segfault on interface free because of uninitialized event listFelix Fietkau2012-05-181-1/+1
|
* add copyright headersFelix Fietkau2012-05-041-0/+13
|
* convert interface event queueing to global interface notifierFelix Fietkau2012-05-041-2/+26
|
* move l3 device tracking to interface core to enforce proper order of ↵Felix Fietkau2012-03-231-2/+2
| | | | address/route removal on device or interface state changes
* fix path and invocation for hotplug callsFelix Fietkau2011-10-201-1/+1
|
* include the DEVICE variable in hotplug eventsFelix Fietkau2011-10-191-3/+9
|
* add ubus events for interface up/downFelix Fietkau2011-10-091-0/+2
|
* rename interface-hotplug.c to interface-event.cFelix Fietkau2011-10-091-0/+105