summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2015-08-25bridge: Allow setting multicast_router optionLinus Lüssing
The multicast_router option of a bridge allows to control the forwarding behaviour of multicast packets independant of the listener state: * 0: Only forward if specific listener is present * 1 (default): Forward if specific listener or a multicast router was detected (currently only learned via query messages, no MRD support yet) * 2: Always forward any multicast traffic on this port Since MRD is not mandated you might end up with silent multicast routers (e.g. if your link has more than one multicast router; only one can become the selected, "noisy" querier). Here you might need a manual configuration option like the "multicast_router" option. Other scenarios where this can be useful are for instance: * Segmentation of IGMP/MLD domains together with ebtables * Dedicated bridge port for monitoring/debugging purposes Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
2015-08-25bridge: Allow setting multicast_to_unicast optionLinus Lüssing
With this patch the multicast_to_unicast feature can be disabled for all wireless interfaces via an according option on the uci bridge interface. This patch also exports the setting information to wireless handler scripts. The hostapd script will need that information to determine whether to enable or disable ap-isolation, for instance. Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
2015-08-25bridge: Fix multicast_to_unicast feature by hairpin+isolateLinus Lüssing
All IGMP and MLD versions suffer from a specific limitation (from a snooping switch perspective): Report suppression. Once a listener hears an IGMPv2/3 or MLDv1 report for the same group itself participates in then it might (if this listener is an IGMPv3 or MLDv2 listener) or will (if this is an IGMPv1/2 or MLDv1 listener) refrain from sending its own report. Therefore we might currently miss such surpressing listeners as they won't receive the multicast packet with the mangled, unicasted destination. Fixing this by first isolating the STAs and giving the bridge more control over traffic forwarding. E.g. refraining to forward listener reports to other STAs. For broadcast and unicast traffic to an STA on the same AP, the hairpin feature of the bridge will reflect such traffic back to the AP interface. However, if the AP interface is actually configured to isolate STAs, then hairpin is kept disabled. Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
2015-08-25proto-shell: add checkup timeout to restart interface.Yousong Zhou
This is mainly for protocols with no_proto_task set. L2TP with xl2tpd is such a case and the issue this commit tries to address is that xl2tpd could fail redialing the connection (segfault or abort) without the notice of netifd causing the concerned interface being left down. This patch solves it by allowing users to configure an timeout value instructing netifd to check if the interface is in up state after its last attempt to setup it and try again if that is not the case. Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2015-08-25Changes for more readability.Yousong Zhou
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2015-08-25netifd: Spawn device events when registering dependency in device_replaceHans Dedecker
Spawn device events when adding dependency in device_replace so the dependency installer gets the actual device status Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2015-08-25netifd: Remove obsolete device_set_present in device_replaceHans Dedecker
New device does not need to be set present as device_check_state called via device_init sets the device present after probing the kernel device Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2015-08-25netifd: Fix device usage after freeHans Dedecker
Prevent new device from being freed in device_replace when device_unlock is called along the function chain triggered by setting the old device as not present Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2015-08-25netifd: Fix SEG fault when device cannot be allocatedHans Dedecker
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2015-07-19device: apply initial settings when creating an external deviceFelix Fietkau
Fixes RPS/XPS settings for wlan devices Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2015-07-03netifd: Add dadtransmits config optionHans Dedecker
Config option dadtransmits allows to configure the amount of Duplicate Address Detection probes to be sent Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2015-06-24Add mtu6 option to override IPv6 MTUSteven Barth
Signed-off-by: Steven Barth <steven@midlink.org>
2015-06-10proto-shell: add support for generic host-dependencies to interfacesSteven Barth
Signed-off-by: Steven Barth <steven@midlink.org>
2015-06-08Fix removal of dynamic interfacesSteven Barth
Also remove obsolete "del_dynamic" call (use "down" instead) Signed-off-by: Steven Barth <steven@midlink.org>
2015-05-27netifd: Add old style vlan devices to device listHans Dedecker
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>
2015-05-27bridge: allow setting hash_max valueLinus Lüssing
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>
2015-05-26uclibc: backwards-compatibility fixesSteven Barth
Signed-off-by: Steven Barth <steven@midlink.org>
2015-05-26linux: more IPv6 onlink-route handling fixes / improvementsSteven Barth
Signed-off-by: Steven Barth <steven@midlink.org>
2015-05-23interface: teardown on l3_dev link lost.Yousong Zhou
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>
2015-05-23proto-shell: simplify no_proto_task assignmentFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2015-05-23proto-shell: allow running protocols without proto_task.Yousong Zhou
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>
2015-05-23interface: minor fix for unnecessary ++ operation.Yousong Zhou
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2015-05-23interface: remove redundant iface_attr_info.Yousong Zhou
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>
2015-05-23system: fix typo in returning address length.Yousong Zhou
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2015-05-19linux: add compat-define for IFA_F_NOPREFIXROUTESteven Barth
Signed-off-by: Steven Barth <steven@midlink.org>
2015-05-19ipv6: use kernel >= 3.14 handling of offlink-addressesSteven Barth
Signed-off-by: Steven Barth <steven@midlink.org>
2015-05-12netifd: Support for configurable default packet steering behaviorHans Dedecker
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>
2015-04-21proto-shell: retry setup if the proto handler script quits without changing ↵Felix Fietkau
the state or starting a process Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2015-04-19interface: remove obsolete device config apply codeFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2015-04-19interface: allow an interface to specify device configs even when there are ↵Felix Fietkau
other interfaces attached to the same device Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2015-04-19netifd: fix an uninitialized variableFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2015-04-18device: add support for removing interface config on reloadFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2015-04-18interface: detect and handle changes in device configFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2015-04-17utils.h: remove leftover commented out codeFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2015-04-17device: remove DEV_ATTR_IFNAME, it is unusedFelix Fietkau
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>
2015-04-14Cleanup issues reported by scan-buildSteven Barth
Signed-off-by: Steven Barth <steven@midlink.org>
2015-04-03netifd: Interface last error supportHans Dedecker
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>
2015-03-31Revert "linux: adjust default policy rules"Steven Barth
Signed-off-by: Steven Barth <steven@midlink.org>
2015-03-31netifd: add metric argument for proto_add_ipv4_routeSteven Barth
Signed-off-by: Steven Barth <steven@midlink.org>
2015-03-27linux: adjust default policy rulesSteven Barth
2015-03-23bridge: allow enabling or disabling the multicast querier independently of ↵Matthias Schiffer
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>
2015-03-22device: fix default initialization for RPS/XPSFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2015-03-22device: add support for configuring RPS/XPS (enabled by default if available)Felix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2015-03-21Fix regression with IPv6 source-dest-routesSteven Barth
2015-03-19add missing argument for ipv4 routesSteven Barth
Signed-off-by: Steven Barth <steven@midlink.org>
2015-03-19Add table argument to shell API for routesSteven Barth
Signed-off-by: Steven Barth <steven@midlink.org>
2015-03-19add prelocal table to manipulate locally destinated trafficSteven Barth
Signed-off-by: Steven Barth <steven@midlink.org>
2015-03-19netifd:Make sure interface device config is also cachedHans Dedecker
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>
2015-03-06netifd: fixes for json-c 0.12John Crispin
Signed-off-by: John Crispin <blogic@openwrt.org>
2015-02-28wireless: fix teardown, always pass the previous config to the teardown ↵Felix Fietkau
handler instead of the new one Signed-off-by: Felix Fietkau <nbd@openwrt.org>