summaryrefslogtreecommitdiff
path: root/ubus.c
Commit message (Collapse)AuthorAgeFilesLines
* netifd: Allow to add link devices which can be marked as non externalHans Dedecker2014-07-301-6/+23
| | | | Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* add_dynamic: remove redundant codeSteven Barth2014-07-291-7/+0
| | | | | | | device_config is unneeded since add_dynamic is used to create aliases checking of setup state is unneeded because of race condition fixes Signed-off-by: Steven Barth <steven@midlink.org>
* ubus: add del_dynamic as complement to add_dynamicSteven Barth2014-07-281-0/+26
| | | | Signed-off-by: Steven Barth <steven@midlink.org>
* Only add dynamic interfaces if the underlying interface is readySteven Barth2014-07-251-0/+4
| | | | Signed-off-by: Steven Barth <steven@midlink.org>
* netifd: Route type supportHans Dedecker2014-06-181-0/+3
| | | | | | | | Patch adds route type support in netifd by means of the route parameter type. By default the route type was unicast; the parameter adss support for local/broadcast/multicast/unicast routes which will be put into the appropriate routing table. If route type parameter is unset the route type will be unicast as before. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* add a interface. prefix to ubus_notify callsJohn Crispin2014-06-051-1/+1
| | | | Signed-off-by: John Crispin <blogic@openwrt.org>
* netifd: Mark interface as dynamic after it has been added in the interface listHans Dedecker2014-04-241-2/+5
| | | | | | | Adding an interface in the interface list in case of a config update will override the node version of the old interface and thus overriding the dynamic interface marker. In case of config update interface_set_dynamic is done on an invalid interface pointer as the new interface pointer has been freed. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* ubus: check the l3_dev pointer before dereferencing itFelix Fietkau2014-04-191-1/+2
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* ubus: use list_empty() instead of the compat wrapperFelix Fietkau2014-03-211-1/+1
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* ubus: fix displaying interface data itemsFelix Fietkau2014-03-201-1/+1
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* Revert "ubus events: don't incorrectly announce an interface as being up"Felix Fietkau2014-03-111-5/+5
| | | | | | Made obsolete by b114b86c70766f67f503077ad1de013c17fbf366 This reverts commit 4d1a597f65bbb49aa843112812d5ca929478c706.
* ubus events: don't incorrectly announce an interface as being upSteven Barth2014-03-051-5/+5
| | | | Signed-off-by: Steven Barth <steven@midlink.org>
* wireless: add a "get_validate" methode to ubusJohn Crispin2014-02-171-0/+24
| | | | Signed-off-by: John Crispin <blogic@openwrt.org>
* netifd : Fix ubus route src mask printingHans Dedecker2014-02-141-1/+1
| | | | | | Fix printing of route src mask attribute when it contains 3 digits Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* Add indicator-flags to ubus and hotplug update-eventsSteven Barth2014-01-171-0/+15
|
* Set dynamic interface flag after adding them so the version is preservedSteven Barth2013-12-121-1/+1
|
* netifd: Don't export default route via UBUS when disabledHans Dedecker2013-12-081-0/+3
| | | | Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* netifd: Export ip4table/ip6table via UBUSHans Dedecker2013-12-081-0/+4
| | | | | | | Export ip4table/ip6table parameters via UBUS to facilitate route inspection and usage by other applications Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* wireless: add support for global up/down commandFelix Fietkau2013-11-291-4/+16
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* add initial support for handling wireless devices via scriptsFelix Fietkau2013-11-291-16/+133
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* IPv6: add class support to regular IPv6 addressesSteven Barth2013-11-271-0/+3
|
* IPv6: Export delegation setting via ubusSteven Barth2013-10-301-0/+1
| | | | | | | This allows foreign prefix delegators to quickly distinguish between managed and unmanaged prefixes. Signed-off-by: Steven Barth <steven@midlink.org>
* add helper function for adding/removing devices to interfacesFelix Fietkau2013-10-221-25/+1
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* interface: rework code to get rid of arbitrary IFNAMSIZ limitation for ↵Felix Fietkau2013-10-191-2/+1
| | | | | | interface names Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* interface: remove "dynamic" argument for interface_init, add the ↵Felix Fietkau2013-10-191-1/+2
| | | | | | interface_set_dynamic function instead Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* Add source-restricted routesSteven Barth2013-10-181-0/+6
|
* Add protocol update notifications and hotplug legacy callsSteven Barth2013-10-171-1/+12
|
* Add ubus function to create nested interfacesSteven Barth2013-10-171-0/+58
|
* Add ubus methods for global interface statusSteven Barth2013-10-171-8/+38
|
* IPv6: reorganize prefix assignmentSteven Barth2013-05-301-0/+2
| | | | | * put parameters in a more suitable place * add support for prefix classes
* Add support for IPv6 and interface target-routes & dependenciesSteven Barth2013-05-131-2/+7
| | | | Signed-off-by: Steven Barth <steven@midlink.org>
* Expose route table if route is not in the main tableJo-Philipp Wich2013-04-041-0/+3
|
* Rewrite IPv6 prefix assignmentSteven Barth2013-04-031-4/+13
|
* Improved IPv6 featuresetSteven Barth2013-02-011-7/+60
| | | | | | | * Fix reloading of ula-prefixes * Added support for temporary addresses and routes * Added support for offlink addresses * Improved status-output for assigned prefixes
* ubus: add a network.interface object to access network.interface.* methods ↵Felix Fietkau2013-01-291-35/+93
| | | | | | without racing wrt. object add/remove Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* Initial IPv6 prefix supportSteven Barth2013-01-151-0/+57
| | | | Signed-off-by: Steven Barth <steven@midlink.org>
* fix removal of unknown deviceNathan Hintz2013-01-061-1/+1
| | | | | | | | | Netifd will crash if an attempt is made to remove a device that is not known to netifd. For instance: ubus call network.interface.lan remove_device "{ \"name\": \"xxx\" }" Signed-off-by: Nathan Hintz <nlhintz@hotmail.com>
* fix error checking of asprintfFrank Meerkötter2012-12-031-2/+1
| | | | | | | | | | | see man asprintf [...] RETURN VALUE When successful, these functions return the number of bytes printed, just like sprintf(3). If memory allocation wasn't possible, or some other error occurs, these functions will return -1, and the contents of strp is undefined. Signed-off-by: Frank Meerkötter <frank@meerkoetter.org>
* use FD_CLOEXEC instead of tracking lists of fdsFelix Fietkau2012-10-291-4/+1
|
* fix device_lock/device_unlock imbalancesFelix Fietkau2012-10-191-2/+5
|
* ubus.c: now that disabled routes are in the inactive subtable it makes no ↵Jo-Philipp Wich2012-09-131-2/+0
| | | | sense to expose the enabled attribute anymore
* ubus.c: move disabled routes, ips, dns server into an "inactive" subtableJo-Philipp Wich2012-09-131-15/+53
|
* apply basic device settings for hotplug devices, e.g. mtu and txqueuelenFelix Fietkau2012-07-121-0/+4
|
* ensure hotplug devices are marked as present in the add path - they are not ↵Felix Fietkau2012-07-121-2/+4
| | | | cleaned up if they have config settings attached to them
* fix device_lock/device_unlock imbalance in the hotplug device handlingFelix Fietkau2012-07-121-2/+2
|
* fix ifname for alias+vlan chainsFelix Fietkau2012-07-051-1/+2
|
* ubus.c: expose metric and mtu values if applicableJo-Philipp Wich2012-06-291-0/+7
|
* ubus.c: expose route enabled stateJo-Philipp Wich2012-06-291-0/+2
|
* device: add support for deferring bringup of devicesFelix Fietkau2012-06-071-0/+38
|
* add an ubus method for dumping available protocol handlersFelix Fietkau2012-05-311-0/+13
|