summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2014-05-09netifd: Remove useless route table parameter check in update_proto_routeHans Dedecker
Not necessary since route table parameter is used as key element in route_cmp Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2014-05-09netifd: Don't assume routes are always applied in all casesHans Dedecker
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2014-05-09netifd: Apply interface metric on configured interface gateway parametersHans Dedecker
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2014-05-06device: prevent interface up/down calls for external devicesFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-05-02interface: clear iface->available before changing main_devFelix Fietkau
Fixes bogus interface restart loop on interface_remove_link Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-05-02interface: use interface_set_main_dev() from interface_remove_linkFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-05-02interface: do not set l3_dev along with main_dev anymoreFelix Fietkau
Made unnecessary by recent fixes to l3_dev handling Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-04-29interface-ip: fix misuse of IN6_IS_ADDR_LINKLOCAL on a netifd specific unionFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-04-29netifd: fix a use-after-free issue on wireless config updateFelix Fietkau
After vlist_add() the device could have been freed Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-04-26netifd: Add interface config support to enable/disable IPv6 in the kernel ↵Hans Dedecker
per device Main use case is being able to disable IPv6 on (a) WAN interface(s) when only IPv4 connectivity is offered or 6rd is used. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2014-04-26interface-event: make eventnames static and constFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-04-26netifd: Rework hotplug event queueing in case of congestionHans Dedecker
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>
2014-04-26netifd: Check rt_table parameter when comparing routesHans Dedecker
Allows to add identical routes in different routing tables Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2014-04-24netifd: Set prefix assignment enabled if the prefix adress can be installedHans Dedecker
No need to install policy routes if the prefix address cannot be installed; clean up of the policy routes and the prefix address only needs to happen when the prefix assignment was active. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2014-04-24netifd: Mark interface as dynamic after it has been added in the interface listHans Dedecker
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>
2014-04-24netifd: fix IPv6 Link-local DNS serverUlrich Weber
interface name must be added to Link-local IPv6 DNS servers, otherwise they are unusable. Signed-off-by: Ulrich Weber <uw@ocedo.com>
2014-04-21config: add support for disabling interfacesFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-04-19ubus: check the l3_dev pointer before dereferencing itFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-04-19interface: ensure that l3_dev gets set whenever the proto handler marks the ↵Felix Fietkau
interface as up Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-04-11interface: add support for a parameter to force setup without a carrier on ↵Felix Fietkau
the underlying device Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-04-10proto-static: ensure that the l3 device is properly setFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-04-10proto-shell: fix a regression with handling multiple proto updates for the ↵Felix Fietkau
same interface Preserve the device when keep == true Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-04-07proto-shell: ensure that l3_dev is always setFelix Fietkau
A link-down event clears l3_dev, so even if the proto handler does not provide a new ifname, it still needs to be set explicitly Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-04-05interface: always delete l3 dev on proto downFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-04-05system-dummy: indicate link on present devicesFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-03-31config: ignore config parser errorsFelix Fietkau
This helps with keeping routers reachable when there are typos in the network config. Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-03-21ubus: use list_empty() instead of the compat wrapperFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-03-21netifd: Reload proto on topology changeHelmut Schaa
Introduce a new device event "topology change" that gets signaled by bridges on adding/removing members. On "topology changes" the proto handlers are requested to "renew" which is most useful for DHCP. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
2014-03-20ubus: fix displaying interface data itemsFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-03-20netifd: Check interface autostart parameter when handling interface state ↵Hans Dedecker
changes Fixes an issue when 2 interfaces make use of the same ifname (device) and one of the interfaces has autostart disabled; bringing up the other interface would also start the interface for which autostart is disabled (link_state and enabled will both be true for the autostart disabled interface and thus a setup will be launched) Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2014-03-19uci: Allow setting the UCI config path on the command lineMatthias Schiffer
Add a -c switch which allows setting an alternative UCI path instead of using the libuci default. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2014-03-11Revert "ubus events: don't incorrectly announce an interface as being up"Felix Fietkau
Made obsolete by b114b86c70766f67f503077ad1de013c17fbf366 This reverts commit 4d1a597f65bbb49aa843112812d5ca929478c706.
2014-03-11netifd: Set interface state in teardown state before launching an interface ↵Hans Dedecker
event Interface state needs to be set in teardown state before launching an interface event otherwise the up state will be reported as true in the ubus interface notify message Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2014-03-11netifd: Assign interface metric to route metric when route is createdHans Dedecker
Interface metric needs to be assigned to the route metric parameter at route creation time. Otherwise if the interface metric is different from 0 route_cmp will wrongly conclude the routes are different. In this case the route will be added/deleted and could end up with the route missing in the kernel depending on the add/delete order. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2014-03-11netifd: Fix bridge MTU setting when a bridge member is addedHans Dedecker
Reapply bridge mtu setting as adding a bridge member will override the bridge mtu in the kernel Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2014-03-07proto-shell: defer init until after command line option processingFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-03-07netifd: fix bridge reloading issueEmanuel Taube
Check in the right order to decide if the bridge have to be set up. Additionally we are consistent with setting it down. Signed-off-by: Emanuel Taube <emanuel.taube@gmail.com>
2014-03-07wireless: defer init until after command line option processingFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-03-05ubus events: don't incorrectly announce an interface as being upSteven Barth
Signed-off-by: Steven Barth <steven@midlink.org>
2014-02-27netifd: Link layer state awareness support on interface levelHans Dedecker
The link layer state is monitored for a given interface; an interface will be setup when both enabled and link layer active. Likewise an interface will be teared down when either disabled or link layer down. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2014-02-27netifd: Link layer state awareness support on device levelHans Dedecker
Device layer is informed by netlink events regarding the link layer status. Link layer status change results in a DEV_EVENT_LINK_UP/DEV_EVENT_LINK_DOWN broadcast event for a given device. Depends on uloop error callback patch. Solves issue reported in https://dev.openwrt.org/ticket/14590 Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> Acked-by: Karl Vogel <karl.vogel@gmail.com>
2014-02-26Don't always assume routes & addresses are appliedSteven Barth
Actually check netlink return values and remember failure. Signed-off-by: Steven Barth <steven@midlink.org>
2014-02-23wireless: fix device config reload regressionFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-02-17wireless: add a "get_validate" methode to ubusJohn Crispin
Signed-off-by: John Crispin <blogic@openwrt.org>
2014-02-17wireless: load and then ignore disabled devicesJohn Crispin
Signed-off-by: John Crispin <blogic@openwrt.org>
2014-02-17add validation rules to proto staticJohn Crispin
Signed-off-by: John Crispin <blogic@openwrt.org>
2014-02-17get_proto_handlers now also dumps the validation infoJohn Crispin
Signed-off-by: John Crispin <blogic@openwrt.org>
2014-02-17make netifd_handler_parse_config honour the luci validation passed from the ↵John Crispin
backend scripts Signed-off-by: John Crispin <blogic@openwrt.org>
2014-02-17add a helper to convert blobmsg types to luci validate rulesJohn Crispin
Signed-off-by: John Crispin <blogic@openwrt.org>
2014-02-16Work around warn_unused_result in recent gcc/libcSteven Barth