aboutsummaryrefslogtreecommitdiff
path: root/net/mwan3/files/etc
Commit message (Collapse)AuthorAge
...
* net/mwan3: add custom address from ip tables to connected ipsetFlorian Eckert2018-10-23
| | | | | | | | | | | With the list param "rt_table_lookup" in the mwan3 section globals, it is now possible to add a additional routing table numbers which would get also parsed and will be added to the connected network. So mwan3 will treat them as they are directly connected to this device. This could be usefull if we use ipsec. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* net/mwan3: fix start/stop/restart executionFlorian Eckert2018-09-24
| | | | | | | Move setting global enabled flag from /etc/init.d/mwan3 to mwan3 command. So we could start mwan3 from the cmd mwan3 as well. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: mwan3rtmon sleep time configurableChen Minqiang2018-08-09
| | | | Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
* mwan3: refine link selectionChen Minqiang2018-08-09
| | | | | | | | | - globals src_ip to none - ip route back to source - add mwan3rtmon - update version to 2.7 Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
* net/mwan3: fix update on connected ip networksFlorian Eckert2018-05-30
| | | | | | | | | If an interface is not tracked by mwan3 or enabled and this interface is setup by netifd, then the connected ipset is not update by mwan3. To fix this also call connected ipset update code even if the interface is not tracked or enabled by mwan3. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* net/mwan3: remove check_quality option from default configFlorian Eckert2018-05-11
| | | | | | | | | The normal situation should be to use ping without quality_check. If quality_check option is not set in the default option then ping quality_check is not performed during tracking. This is and should be the default situation. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: Packet Loss & Latency CheckNishant Sharma2018-05-11
| | | | | | | 1. Test link quality based on packet loss & latency w.r.t. pre-defined high and low watermark values. 2. Extended ubus support to provide packet loss & latency information per wan per track_ip Signed-off-by: Nishant Sharma <codemarauder@gmail.com>
* mwan3: ipv6-compatible default confLuiz Angelo Daros de Luca2018-04-03
| | | | | | | | | | | | | | | | | Considering that ipv6 NPT/NAT/NETMAP is done manually by user, mwan3 can balance ipv6 interfaces as it does with ipv4. Interface wan2 was renamed to wanb as wan2, wan3, ... will eventually colide with OpenWrt with default wan6 interface when more than 6 interfaces are in use. New interfaces, members for wan6 and wanb6 where created, both disabled by default. Policies where adapted as well. The option "family" is set respectively in each interface. When missing, mwan3 assumes ipv4, that will fail when interface is IPv6 only. Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
* mwan3: Add missing globals config sectionRob White2018-04-01
| | | | | | | | | Add missing globals config section with default values. Without the correctly named section, mwan3 startup will fail with the error - Warning: mwan3 is global disabled. Usage: /etc/init.d/mwan3 start. Compile: not required Run tested: LEDE 17.01.04 Author-name: Rob White Maintainer: Florian Eckert <fe@dev.tdt.de> Signed-off-by: Rob White <rob@blue-wave.net>
* net/mwan3: update hint in mwan3.user for connected/disconnectedFlorian Eckert2018-03-16
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* net/mwan3: add mwan3_init functionFlorian Eckert2018-02-05
| | | | | | | Move all shell commands which are executed during /lib/mwan3/mwan3.sh sourceing into a seperate init function which must be called at first. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* net/mwan3: add init script to enable/disable mwan3 globallyFlorian Eckert2018-02-05
| | | | | | | Adding a init script to "/etc/init.d/" introduce the possibility to enable/disable mwan3 globally. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* net/mwan3: change usleep to sleep commandFlorian Eckert2017-11-16
| | | | | | fix bug use sleep instead of usleep Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: reduce dependency on src_ipDavid Yang2017-11-08
| | | | | | | Interfaces may be managed by 3rd-party scripts, thus src_ip may not be always available in uci. Signed-off-by: David Yang <mmyangfl@gmail.com>
* mwan3: fix empty gateway when creating routing tableDavid Yang2017-11-08
| | | | | | | | Interfaces of some PtP protocols do not have a real gateway. In that case ubus may fill them with '0.0.0.0' or even leave it blank. This will cause error when adding new routing rule. Signed-off-by: David Yang <mmyangfl@gmail.com>
* net/mwan3: fix mwan3track STATUS if initial_state is offlineFlorian Eckert2017-09-12
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: fix interface-bound traffic when interface is offlineMarcin Jurkowski2017-09-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit fixed what 6d99b602 was supposed to fix without affecting interface-bound traffic. Before 6d99b602 interface-bound traffic was working normally as long as at least one interface was online. However when the last interface went offline, it was impossible to ping and such state was unrecoverable. Commit 6d99b602 fixed unrecoverable offline state problem (it was possible to ping -I iface) but messed inteface-bound traffic. Traffic with interface source address was not working if the interface was in "offline" state, even if another interface was online. The problem was caused by an inconsistent "offline" interface state: iptables-related rules were kept while routing table and policy were deleted. The idea behind this commit is to: 1. Keep all the rules for each interface (iptables, routing table, policy) regardless of its state. This ensures consistency, 2. Make interface state hotplug events affect only iptables' mwan3_policy_* rules. Interface-related iptables, routing table and policy is removed only when mwan3 is manually stopped. To make such changes possible, it's necessary to change the way mwan3_policy_* rule generator keeps track of interface state hotplug events. Until now, it checked for the existence of custom interface-related routing table (table id 1, 2, 3, ...). Clearly we can no longer rely on that so each interface state is stored explicitly in file. Signed-off-by: Marcin Jurkowski <marcin1j@gmail.com>
* net/mwan3: fix /var/state issue in 14-mwan3 hotplugFlorian Eckert2017-09-01
| | | | | | | | Use common function to toggle ip address in /var/state/mwan3. Change also to use toggle function and not set function. If ip address is often changed every change is saved to /var/state/mwan3. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: fix bugs introduced in 815e83d4Marcin Jurkowski2017-08-17
| | | | | | | | | | Fixes the following bugs introduced in commit 815e83d4: - hotplug: invalid parameter order when initial interface state is "online", mwan3track expects initial state to be the third argument - hotplug: missing source ip address when initial interface state is "offline" - mwan3track: source ip address should be the fourth argument Signed-off-by: Marcin Jurkowski <marcin1j@gmail.com>
* net/mwan3: add hotplug script for hidden self interface generationFlorian Eckert2017-08-10
| | | | | | | | | | | | | | Add new globals config section with option local_source. With this config option the self interface generation will be done now automatically on hotplug event. You can specify which interface (ip) sould be used for router traffic. To replace the self intereface in the config set local_source to "lan". The default option is none, so it will not change default behavior if a "self" interface is configured in the network section. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* net/mwan3: fix ipset generation in hotplug script with an lockFlorian Eckert2017-08-10
| | | | | | Fix critical section during hotplug events. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* net/mwan3: on startup mark interface online only if track_ip are reachableFlorian Eckert2017-08-10
| | | | | | | | | | | | | | | | Add new interface config option "inital_state". If interface comeing up the first time(mwan3 start, boot), there are now two option for interface behaviour: - online (default as is now) Set up interface regardless wether tracking ip are reachable or not. - offline Set up interface first to ping tracking ip and if they are reachable set up the interface completely. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* net/mwan3: fix ping issue if last interface recovers from failureFlorian Eckert2017-08-10
| | | | | | | | | | | Even though error was fixed the interface checks still fails, if last_resort was set to blackhole or unreachable. To fix this issue do not remove failure interface from iptables change on down event. Reported-by: Colby Whitney <colby.whitney@luxul.com> Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* net/mwan3: change logging output on hotplug interface eventFlorian Eckert2017-08-10
| | | | | | Change logging output on hotplug interface event Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: support various interface tracking methodsMarcin Jurkowski2017-08-02
| | | | | | | | | | | | Adds support for interface tracking using either ping, arping or httping. This allows to track interface status on networks with filtered ICMP traffic or simply to monitor data link layer etc. To facilitate binding to a specified interface its IP address is passed as a new mwan3track parameter. It's currently required by httping and possibly by other tools that may be added in the future. Signed-off-by: Marcin Jurkowski <marcin1j@gmail.com>
* net/mwan3: add lock for mwan3 hotplug scriptFlorian Eckert2017-06-22
| | | | | | | | | | If more then one interface get up/down at once mwan3 could be in a undefined state, because more then one mwan3 hotplug script are running and editing the iptables. Lock the critical section should solve this issue. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* net/mwan3: remove absolute path for bin filesFlorian Eckert2017-05-12
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* net/mwan3: add connected network regardless of mwan3 interface enable stateFlorian Eckert2017-04-27
| | | | | | | | If netifd set an interface up/down which is not tracked by mwan3 the connected network of that interface should regardless be added/removed to the mwan3_connected ipset. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* net/mwan3: registrate SIGUSR1 trap on interface down eventFlorian Eckert2017-04-11
| | | | | | | | | | | | If interface is getting down by netifd (unplug ethernet cable) mwan3track will not recognize this change. It will also generate an additional down event when he notice does his tracking interface is offline. Mwan3track will now be informed by a signal (trap) USR1 during down event that the interface is already down. An additional down event will not be generated. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* Merge pull request #4174 from TDT-GmbH/mwan3-add-ubus-checkchamptar2017-03-24
|\ | | | | net/mwan3: add ubus interface check
| * net/mwan3: add ubus interface checkFlorian Eckert2017-03-21
| | | | | | | | | | | | | | | | | | On interfaces with interface proto "qmi|ncm" and option dhcp enabled the interface will be changed to $iface_4 | $iface_6. The interface mapping in mwan3 will not recognize this interface. To fix this issue an ubus call will check if an upper interface exists. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* | net/mwan3: pass environment variables to mwan3-userFlorian Eckert2017-03-21
|/ | | | | | | User scripts conversion from luci-app-wan3 will be simplified if the variables are passed by env instead of arguments. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* Merge pull request #4158 from TDT-GmbH/mwan-fix-hotplugHannu Nyman2017-03-18
|\ | | | | net/mwan3: fix hotplug on ACTION ifdown
| * net/mwan3: fix hotplug on ACTION ifdownFlorian Eckert2017-03-17
| | | | | | | | | | | | | | | | On dynamic interface proto (dhcp/pppoe) the hotplug will not execude (exit 9) because the gateway is already released. The check will now only be made on a ifup ACTION event. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* | net/mwan3: add mwan3.user hotplug scriptFlorian Eckert2017-03-17
|/ | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* net/mwan3: reset conntrack table on iface up/down eventFlorian Eckert2017-03-16
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: remove bad local shell variable declarationsJo-Philipp Wich2016-09-24
| | | | | | | Local variable declarations outside of functions are illegal since the Busybox update to v1.25.0, therfore remove them from the appropriate places. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* mwan3: update to version 2.0-1Jeroen Louwes2015-12-17
| | | | | | | Fix issue with sticky sessions not working correctly Fix issue where user created ipsets were not applied Signed-off-by: Jeroen Louwes <jeroen.louwes@gmail.com>
* mwan3: update to version 2.0-0Jeroen Louwes2015-11-19
| | | | | | | IPv6 support! :D Big code overhaul; expect bugs.. Signed-off-by: Jeroen Louwes <jeroen.louwes@gmail.com>
* mwan3: update to version 1.6-3Jeroen Louwes2015-10-20
| | | | | | Fix for changed location ip binary Signed-off-by: Jeroen Louwes <jeroen.louwes@gmail.com>
* mwan3: update to version 1.6-1Adze15022015-03-17
| | | | | | | Add ipset support (ipset version >6.22 with ipmark required) Add stickiness feature Signed-off-by: Jeroen Louwes <jeroen.louwes@gmail.com>
* mwan3: update to version 1.5-10Adze15022015-01-15
| | | | | | | Fixed issue in mwan3 status output with mwan3 interfaces not yet configuerd in network config Removed nexthop argument as it is no longer used Signed-off-by: Jeroen Louwes <jeroen.louwes@gmail.com>
* mwan3: update to version 1.5-9Adze15022014-12-22
| | | | | | | Fix issue where config file would be overwritten in some cases Fix issue where local address of wan point-to-point links were unreachable from lan Signed-off-by: Jeroen Louwes <jeroen.louwes@gmail.com>
* mwan3: update to version 1.5-7Adze15022014-10-02
| | | | | | | Fixed issue where an manual ifup-ed interface would immediatly go down again Remove from init as mwan3 is not a service Signed-off-by: Jeroen Louwes <jeroen.louwes@gmail.com>
* mwan3: update to version 1.5-6Adze15022014-09-25
| | | | | | | Fixed issue where mwan3 would not immediately set interface down on link-loss event Added feature to define last-resort action on policies with no members Signed-off-by: Jeroen Louwes <jeroen.louwes@gmail.com>
* mwan3: update to version 1.5-4Adze15022014-09-09
| | | | | | Fix issue with more than one link route on a wan interface Signed-off-by: Jeroen Louwes <jeroen.louwes@gmail.com>
* mwan3: update to version 1.5-3Adze15022014-08-14
| | | | | | Better way of fixing the "icmp unreachable exits wrong interface" problem Signed-off-by: Jeroen Louwes <jeroen.louwes@gmail.com>
* mwan3: Update to version 1.5-2Adze15022014-08-12
| | | | | | | Fix issue icmp unreachables go out wrong interface Remove unnecessary line Signed-off-by: Jeroen Louwes <jeroen.louwes@gmail.com>
* mwan3: Update to version 1.5-1Adze15022014-08-10
| | | | | | | Add iptables -w option, which increases stability, requires iptables v1.4.20. Code cleanup Signed-off-by: Jeroen Louwes <jeroen.louwes@gmail.com>
* Add mwan3 to packages feedAdze15022014-08-08
Signed-off-by: Jeroen Louwes <jeroen.louwes@gmail.com>