summaryrefslogtreecommitdiff
path: root/scripts
Commit message (Collapse)AuthorAgeFilesLines
* wireless: fix _wireless_add_processGünther Kelleter2017-02-111-2/+2
| | | | | | | The pid is in $1, not $pid. Use proper test condition for nonmatching exe warning. Signed-off-by: Günther Kelleter <guenther.kelleter@devolo.de>
* proto-shell: add helpers for generic options in proto handlersMarcin Jurkowski2016-10-271-0/+13
| | | | | | | | Adding helpers for virtual interfaces generic options in ncm, qmi, mbim and directip protocols as suggested by Felix in https://lists.openwrt.org/pipermail/openwrt-devel/2016-February/039794.html Signed-off-by: Marcin Jurkowski <marcin1j@gmail.com>
* proto-shell: Support teardown on layer 3 link lossHans Dedecker2016-08-111-0/+2
| | | | | | | | | | | | | Commit c6858766 added interface teardown support on layer 3 device link loss mainly for shell protocols who have no proto task like xl2tp. However for shell protocols having a proto task it is not always the correct action to teardown the interface; as an example the PPP daemon can be put into persist state trying to re-establish the link via a hold-off mechanism if layer 3 link loss is detected. Therefore shell handlers can enable via TEARDOWN_ON_L3_LINK_DOWN a proto flag which will teardown the interface when layer 3 link loss is detected Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* wireless: rename 'wpa_pairwise' variable to 'wpa_cipher'Daniel Golle2016-01-191-6/+7
| | | | | | | | | We shall enforce the cipher for both, pairwise and group, thus change the name of the variable to a more generic phrasing, 'cipher' instead of 'pairwise'. Signed-off-by: Daniel Golle <daniel@makrotopia.org> Signed-off-by: Felix Fietkau <nbd@openwrt.org> [keep a copy for compatibility reasons]
* wireless: fix bogus isolate setting on unbridged configurationFelix Fietkau2015-09-271-4/+2
| | | | | | | This was caused by a faulty test for the isolate option (arithmetic on a variable with no default) Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* bridge: Allow setting multicast_to_unicast optionLinus Lüssing2015-08-251-0/+1
| | | | | | | | | | | 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>
* bridge: Fix multicast_to_unicast feature by hairpin+isolateLinus Lüssing2015-08-251-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* proto-shell: allow running protocols without proto_task.Yousong Zhou2015-05-231-0/+2
| | | | | | | | | | | | | | | 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>
* netifd: Interface last error supportHans Dedecker2015-04-031-0/+1
| | | | | | | | | | | | | | 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>
* netifd: add metric argument for proto_add_ipv4_routeSteven Barth2015-03-311-1/+2
| | | | Signed-off-by: Steven Barth <steven@midlink.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>
* Enable callers to pass the source IP of an IPv4 route when usingKristian Evensen2014-12-081-1/+2
| | | | | | | | | proto_add_ipv4_route(). This is useful with for example DHCP in a multihomed scenario, as it provides an easy way to match default routes with the correct IP address. One use case for this are applications that monitor the state of the WAN port, and the WAN port is assigned multiple addresses. Signed-off-by: Kristian Evensen <kristian.evensen at gmail.com>
* scripts: set type for the "key" attributeFelix Fietkau2014-07-181-1/+1
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* netifd: Reload proto on topology changeHelmut Schaa2014-03-211-1/+9
| | | | | | | | | | 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>
* wireless: fix getting the network_bridge variableFelix Fietkau2013-12-021-9/+2
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* wireless: fix htmode handlingFelix Fietkau2013-12-021-2/+2
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* wireless: call an initial cleanup functionFelix Fietkau2013-12-021-0/+2
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* wireless: fix process handling if the pid exe is a symlinkFelix Fietkau2013-12-011-1/+5
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* wireless: add some device/vif error debug messagesFelix Fietkau2013-11-301-0/+2
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* wireless: fix channel checkFelix Fietkau2013-11-301-2/+2
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* add initial support for handling wireless devices via scriptsFelix Fietkau2013-11-291-0/+321
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* utils.sh: add N (newline)Felix Fietkau2013-11-291-0/+3
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* IPv6: add class support to regular IPv6 addressesSteven Barth2013-11-271-1/+5
|
* proto-shell: fix legacy proto_config_add_* functions, make them wrap around ↵Felix Fietkau2013-10-311-3/+3
| | | | | | config_add_* Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* scripts/utils.sh: add a function for setting a variable defaultFelix Fietkau2013-10-291-0/+6
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* scripts: make config_add_* parameters take multiple argumentsFelix Fietkau2013-10-221-8/+12
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* scripts: add config_add_array() to utilsFelix Fietkau2013-10-191-0/+4
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* scripts: remove the executable flag from netifd-proto.shFelix Fietkau2013-10-191-0/+0
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* scripts: move some utility functions out of netifd-proto.sh into utils.shFelix Fietkau2013-10-192-25/+39
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* scripts: reorganize directory layoutFelix Fietkau2013-10-192-1/+399
| | | | | | | move example scripts from dummy/ to examples/ keep scripts that can be used as-is in scripts/ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* scripts: delete ifup/ifdown, they are unusedFelix Fietkau2013-10-192-21/+0
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* add support for calls to a hotplug script on interface state changesFelix Fietkau2011-10-071-0/+1
|
* add an example script for ifup/ifdownFelix Fietkau2011-03-272-0/+21