summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Fix buildbaserock/fix-buildRichard Dale2015-06-172-2/+4
|
* proto-shell: add support for generic host-dependencies to interfacesSteven Barth2015-06-101-13/+19
| | | | Signed-off-by: Steven Barth <steven@midlink.org>
* Fix removal of dynamic interfacesSteven Barth2015-06-082-29/+5
| | | | | | Also remove obsolete "del_dynamic" call (use "down" instead) Signed-off-by: Steven Barth <steven@midlink.org>
* netifd: Add old style vlan devices to device listHans Dedecker2015-05-271-1/+1
| | | | | | | | | | | Just like other device types old vlan style devices are added to the device list which means they're displayed when the device list is displayed via ubus. Additionally global device setting config like default packet steering behavior is now also applied for old style vlan devices when doing a network reload. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* bridge: allow setting hash_max valueLinus Lüssing2015-05-273-0/+12
| | | | | | | | | | | | If the number of entries in the MDB exceeds hash_max then the multicast snooping capabilities of the bridge are disabled automatically. The default value for hash_max is 512 which is already exceeded by some wireless community mesh networks. They need to be able to set a higher value. Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
* uclibc: backwards-compatibility fixesSteven Barth2015-05-261-0/+9
| | | | Signed-off-by: Steven Barth <steven@midlink.org>
* linux: more IPv6 onlink-route handling fixes / improvementsSteven Barth2015-05-262-22/+14
| | | | Signed-off-by: Steven Barth <steven@midlink.org>
* interface: teardown on l3_dev link lost.Yousong Zhou2015-05-231-5/+23
| | | | | | | | | | This is mainly for shell protocols that has no_proto_task so that we can still teardown and setup the interface on l3_dev link lost instead of depending on running state of proto_task. Also rename related callbacks for better clarification. Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
* proto-shell: simplify no_proto_task assignmentFelix Fietkau2015-05-231-4/+1
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* proto-shell: allow running protocols without proto_task.Yousong Zhou2015-05-232-2/+12
| | | | | | | | | | | | | | | Adds a new config parameter "no-proto-task" for noting that no proto_task will be running for this protocol type. This is required since then change in commit "d0dcf74 proto-shell: retry setup if the proto handler script quits without changing the state or starting a process". The change is mainly for protocols like xl2tpd in which control commands are sent to another daemon xl2tpd to start L2TP negotiation and pppd process who is not under netifd's control as proto_task as is the case in other ppp related protocols like pppoe, pptp, etc. Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
* interface: minor fix for unnecessary ++ operation.Yousong Zhou2015-05-231-1/+1
| | | | Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
* interface: remove redundant iface_attr_info.Yousong Zhou2015-05-231-6/+0
| | | | | | | | BLOBMSG_TYPE_STRING is the default type for elements of BLOBMSG_TYPE_ARRAY. Array type IFACE_ATTR_DNS_SEARCH was already missing there, so drop the whole part anyway. Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
* system: fix typo in returning address length.Yousong Zhou2015-05-231-1/+1
| | | | Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
* linux: add compat-define for IFA_F_NOPREFIXROUTESteven Barth2015-05-191-0/+4
| | | | Signed-off-by: Steven Barth <steven@midlink.org>
* ipv6: use kernel >= 3.14 handling of offlink-addressesSteven Barth2015-05-192-9/+10
| | | | Signed-off-by: Steven Barth <steven@midlink.org>
* netifd: Support for configurable default packet steering behaviorHans Dedecker2015-05-123-7/+58
| | | | | | | | | | | | The default packet steering behavior can be configured via the parameter default_ps in the global section; the default value is true to keep backwards compatibility. Device packet steering (rps/xps) config can still be used to override the default behavior. This allows you to disable packet steering for all devices without the need to define a device config list which disables receive/transmit packet steering Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* proto-shell: retry setup if the proto handler script quits without changing ↵Felix Fietkau2015-04-211-3/+10
| | | | | | the state or starting a process Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* interface: remove obsolete device config apply codeFelix Fietkau2015-04-191-21/+1
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* interface: allow an interface to specify device configs even when there are ↵Felix Fietkau2015-04-192-1/+6
| | | | | | other interfaces attached to the same device Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* netifd: fix an uninitialized variableFelix Fietkau2015-04-191-1/+1
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* device: add support for removing interface config on reloadFelix Fietkau2015-04-182-5/+16
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* interface: detect and handle changes in device configFelix Fietkau2015-04-181-0/+32
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* utils.h: remove leftover commented out codeFelix Fietkau2015-04-171-3/+1
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* device: remove DEV_ATTR_IFNAME, it is unusedFelix Fietkau2015-04-173-3/+1
| | | | | | | Ensures that interfaces with only 'ifname' matching the device config don't cause iface->device_config to be set Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* Cleanup issues reported by scan-buildSteven Barth2015-04-143-4/+3
| | | | Signed-off-by: Steven Barth <steven@midlink.org>
* netifd: Interface last error supportHans Dedecker2015-04-035-2/+37
| | | | | | | | | | | | | | Adds interface last error support which preserves the last reported error reported by the protocol handler till the interface is up; e.g. survives network reload and interface restarts. This is mainly usefull for tracking down why an interface fails to establish; eg auth failure/traffic limit for PPP interfaces Protocol handlers register last error support by setting lasterror=1 in the proto_init function Signed-off-by: Johan Peeters <johan.peeters111@gmail.com> Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* Revert "linux: adjust default policy rules"Steven Barth2015-03-311-2/+16
| | | | Signed-off-by: Steven Barth <steven@midlink.org>
* netifd: add metric argument for proto_add_ipv4_routeSteven Barth2015-03-311-1/+2
| | | | Signed-off-by: Steven Barth <steven@midlink.org>
* linux: adjust default policy rulesSteven Barth2015-03-271-16/+2
|
* bridge: allow enabling or disabling the multicast querier independently of ↵Matthias Schiffer2015-03-233-2/+9
| | | | | | | | | | | | | | IGMP snooping In larger networks, especially big batman-adv meshes, it may be desirable to enable IGMP snooping on every bridge without enabling the multicast querier to specifically put the querier on a well-connected node. This patch adds a new UCI option 'multicast_querier' for bridges which allows this. The default is still the value of the 'igmp_snooping' option to maintain backwards compatiblity. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* device: fix default initialization for RPS/XPSFelix Fietkau2015-03-222-3/+2
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* device: add support for configuring RPS/XPS (enabled by default if available)Felix Fietkau2015-03-223-0/+51
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* Fix regression with IPv6 source-dest-routesSteven Barth2015-03-211-4/+4
|
* add missing argument for ipv4 routesSteven Barth2015-03-191-1/+1
| | | | Signed-off-by: Steven Barth <steven@midlink.org>
* Add table argument to shell API for routesSteven Barth2015-03-191-2/+6
| | | | Signed-off-by: Steven Barth <steven@midlink.org>
* add prelocal table to manipulate locally destinated trafficSteven Barth2015-03-191-0/+14
| | | | Signed-off-by: Steven Barth <steven@midlink.org>
* netifd:Make sure interface device config is also cachedHans Dedecker2015-03-195-9/+6
| | | | | | | | | | Fixes issue interface device config is not applied in some cases. As the interface device config was applied but not always cached; an interface device config diff was not always detected. Simplify device config setting by exposing as api only device_apply_config Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* netifd: fixes for json-c 0.12John Crispin2015-03-062-3/+2
| | | | Signed-off-by: John Crispin <blogic@openwrt.org>
* wireless: fix teardown, always pass the previous config to the teardown ↵Felix Fietkau2015-02-282-2/+23
| | | | | | handler instead of the new one Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* netifd: Set interface device config when device has old settingsHans Dedecker2015-02-171-1/+1
| | | | | | | | If interface device settings are removed in UCI they were not removed in the device settings; calling device_set_config when device settings are present solves this. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* netifd: Keep reference to a config copy in device type specific reload ↵Hans Dedecker2015-02-173-0/+9
| | | | | | | | | handler as the original config pointer might go stale Fixes random observed crashes in blobmsg_parse when device type specific config data is parsed. 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>
* utils.c: add missing includeFelix Fietkau2015-02-161-0/+1
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* Revert "interface: do not set device_config where only the ifname option ↵Felix Fietkau2015-02-161-1/+1
| | | | | | | | | | matches" This reverts commit 8dd2eedafccc9f898d391b93a59efb1412c5b5e9. This commit was reported to cause a regression with setting MTU on interfaces. Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* netifd: Add option to configure base_reachable_time_ms for each deviceHans Dedecker2015-02-093-9/+67
| | | | | | | | The UCI parameter neighreachabletime allows to control the hardware address to IP mapping lifetime in the neighbour table for both IPv4 and IPv6 Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> Signed-off-by: Jean-Francois Remy <jeff@melix.org>
* netifd: Remove unnecessary default_config check in config_parse_interfaceHans Dedecker2015-02-091-1/+1
| | | | | | No need to check default_config twice as it's already checked in config_parse_interface Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* netifd: set current_config for simple devices when parsing device configHans Dedecker2015-02-091-0/+1
| | | | | | | If currrent_config is not set when the simple device config is applied the device will be deleted in device_reset_old Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* Revert "vlan: reset device state on init"Felix Fietkau2015-01-241-3/+0
| | | | | | This is causing a regression with some VLAN configurations This reverts commit a4445215e06ee3056427effbef617f4525ee1836.
* device: force changes to be applied via state change if necessaryFelix Fietkau2015-01-241-0/+4
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* interface: suppress unnecessary device config overridesFelix Fietkau2015-01-241-1/+2
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>