aboutsummaryrefslogtreecommitdiff
path: root/net/mwan3/files/etc
Commit message (Collapse)AuthorAge
* mwan3: make mwan3.user executableFlorian Eckert2022-12-19
| | | | | | | | | | | | | | | This is a fix for the the following change: https://github.com/openwrt/packages/commit/3d824ea288d907a31729c3629e884ea122c30da0 Before the change, it was only possible to execute a shell script. To remove this restriction, a binary or other script language can now also be used for 'mwan3.user'. Unfortunately, the old shell script was not executable for older mwan3 version. During a sysupgrade with config transfer, this 'mwan3.user' script could not be executed for newer mwan3 versions. To fix this, the calling script checks whether the 'mwan3.user' is executable, and if not, this executable bit is now set. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: Switch default track_ip targets from Google DNS to Cloudflare DNSJames White2022-09-25
| | | | Signed-off-by: James White <james@jmwhite.co.uk>
* mwan3: fix balanced default configFlorian Eckert2022-09-14
| | | | | | | The metrics and weight need to be the same. A 50% balanced would be require member policies of the same metric and weight value. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: add sleep to release ipset referenceFlorian Eckert2022-03-14
| | | | | | | | It turns out that under high system load, ipsets cannot be deleted. This is because there is still a reference in iptables. A short sleep should give the system time to clean this up. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: remove not needed ipset del cmdFlorian Eckert2022-03-14
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: Split ipsets into separate ipv4 and ipv6 setsFlorian Eckert2022-03-14
| | | | | | | | | | Nft does not directly support ipsets, nft sets must be used instead. The mwan3 uses ipsets for certain tasks. They can be combinded. So called an ipset of ipsets. This list type is not available in nft. So that mwan3 could be ported to nft in the feature, the ipset handling should be split. So we have for each ipset an iptables rule. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: move command definitions to common.shFlorian Eckert2022-03-14
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: fix mwan3 flush conntrack table callFlorian Eckert2021-12-22
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: Use shebang in /etc/mwan3.userBrian J. Murrell2021-09-03
| | | | | | | | | To allow the script to define what it should be run with. This let's the user use bash if it's available, or python, or perl, etc. Signed-off-by: Brian J. Murrell <brian@interlinx.bc.ca> Update PKG_VERSION to 2.10.11 Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* Merge pull request #15537 from aaronjg/mwan3/notrackFlorian Eckert2021-05-06
|\ | | | | mwan3: allow interfaces with no tracking IPs
| * mwan3: allow interfaces with no tracking IPsAaron Goodman2021-05-02
| | | | | | | | | | | | | | In the procd refactor, support for interfaces with no tracking IPs was inadvertentiy removed. This commit restores the previous behavior Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
* | mwna3: fix whitespaceFlorian Eckert2021-05-03
|/ | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: fix regression in ipv6 routing tablesAaron Goodman2021-01-02
| | | | Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
* mwan3: remove unused mwan3_unlock function callFlorian Eckert2020-12-22
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: fix MWAN3_STARTUP callerFlorian Eckert2020-12-22
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: fix whitspaceFlorian Eckert2020-12-22
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: fix logger tag in mwan3 initFlorian Eckert2020-12-22
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: improve route flushing on mwan3 stopAaron Goodman2020-12-16
| | | | | | only attempt to flush routes for the relevant family Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
* mwan3: Update documentation information for mwan3.user fileJames White2020-11-16
| | | | Signed-off-by: James White <james@jmwhite.co.uk>
* mwan3: add IPKG_INSTROOT to scriptsAaron Goodman2020-11-10
| | | | | | IPKG_INSTROOT needed for including mwan3 when building images Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
* mwan3: restore +x flag to mwan3 executablesAaron Goodman2020-11-10
| | | | Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
* mwan3: remove unneeded ipset setup in hotplugAaron Goodman2020-11-10
| | | | | | connected ipset handled on mwan3rtmon, so not needed in hotplug Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
* mwan3: fix hotplug issues from 1f1d21Aaron Goodman2020-11-10
| | | | Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
* mwan3: make it clearer who initiated the startFlorian Eckert2020-11-06
| | | | | | | | | It was somewhat opaque how the variable a is questioned. To show this better the variable is now a string and not a boolean. So you can see directly what should happen. With a boolean you always have to think about what it means when 0 or 1 is used. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: use procd for locking everywhereAaron Goodman2020-11-06
| | | | | | | | | | | | | | | | | | | Replace locks on /var/run/mwan3.lock with locks via procd. This fixes a deadlock issue where mwan3 stop would have a procd lock, but a hotplug script would have the /var/run/mwan3.lock Locking can be removed from mwan3rtmon since: 1) procd will have sent the KILL signal to the process during shutdown, so it will not add routes to already removed interfaces on mwan3 shutdown and 2) mwan3rtmon checks if an interface is active based on the mwan3_iface_in_<IFACE> entry in iptables, and the hotplug script always adds this before creating the route table and removes it before deleting the route table Fixes github issue #13704 (https://github.com/openwrt/packages/issues/13704)
* mwan3: reload unreachable/blackhole rules on hotplugAaron Goodman2020-11-06
| | | | | | | | | when the network procd service restarts, it flushes the ip rules. We need to add these rules back. Since hotplug events are triggered when the networks come back online, adding this call to the hotplug script is the most convenient place to refresh the rules. Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
* mwan3: use common makefile install wrappersFlorian Eckert2020-11-06
| | | | | | | With this change you can see at a glance which files will be installed on the system. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: remove not needes jshn.sh includeFlorian Eckert2020-11-06
| | | | | | Remove not needed jshn.sh include. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: fix reload handlingFlorian Eckert2020-10-23
| | | | | | | | When the interface section was changed, the changed configuration options were not applied. This commit adds the service reload handling again. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: Simplify default configuration, mostly use defaultsJames White2020-10-16
| | | | Signed-off-by: James White <james@jmwhite.co.uk>
* mwan3: use procd for mwan3rtmon and mwan3trackAaron Goodman2020-10-16
| | | | | | | | | | | start all mwan3mon and mwan3track instances on mwan3 start if an interface is down when mwan3track starts, it waits for a signal from the hotplug script to start procd can then handle stopping all of the scripts when mwan3 is halted Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
* mwan3: only update src_iface rules on ifupAaron Goodman2020-10-16
| | | | Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
* mwan3: improvements to route creationAaron Goodman2020-10-16
| | | | | | | | | | | | | | | | | | handle creation of routing tables in mwan3rtmon to avoid race conditions and potentially missing routes handle ipv6 routes that have expiry update directly connected ipset when routes are added or deleted add fall through rules so that the default routing table is not used if no rule in the interface-specific routing table matches add option to comply with mwan3 source based routing get default route parameters from main routing table Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
* mwan3: fixup some extra spaces and shellcheck warningsAaron Goodman2020-10-16
| | | | Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
* mwan3: improve startup performance; version 2.9.0Aaron Goodman2020-08-17
| | | | | | | | | | | | | | | | | | | | | | improve startup and runtime performance by 1) moving common startup procedures out of hotplug script when called from mwan3 start 2) reducing calls to iptables to check status of rules 3) consolidating iptables updates and updating with iptables-restore 4) do not wait for kill if nothing was killed 5) running interface hotplug scripts in parallel 6) eliminate operations in hotplug script that check status on every single interface unnecessarily 7) consolidate how mwan3track makes hotplug calls 8) do not restart mwan3track on connected events This is a significant refactor, but should not result in any breaking changes or require users to update their configurations. version bump to 2.9.0 Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
* mwan3: use ip monitor route to detect routing changesAaron Goodman2020-08-15
| | | | | | | | | | | use only committed uci changes for updating routing table use functions.sh functions rather than uci command line tool to find interfaces for routing table. consolidate rtmon_ipv4 and rtmon_ipv6 functions into a single function Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
* mwan3: unify variable checkFlorian Eckert2020-07-28
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: fix race condition on mwan3 restartFlorian Eckert2020-07-28
| | | | | | | This adjustment of the locks fixes the race condition when a mwan3 hotplug script and a mwan3 command are running at the same time. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: add workaround for procd changeFlorian Eckert2020-07-20
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: add default rule for ipv6 in example configAaron Goodman2020-07-19
| | | | | | | default rule only applied to ipv4 with dest_ip 0.0.0.0/0 and error was hidden when trying to apply it in ip6table Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
* mwan3: switch to procd init scriptFlorian Eckert2020-06-17
| | | | | | This enables the procd handling for mwan3 on config change. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: Add missing IPs to wanbDaniel A. Maierhofer2019-08-04
| | | | | | | | | | | Maintainer: Florian Eckert @feckert Compile tested: not needed Run tested: x86_64 Description: Only two of the four IPs defined for wan are found in wanb, adding it so it is the same. Signed-off-by: Daniel A. Maierhofer <git@damadmai.at>
* mwan3: add migration script for flush_conntrack configFlorian Eckert2019-07-04
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: change flush_conntrack handling to use uci list elementFlorian Eckert2019-06-03
| | | | | | | | | With this change it is now possible to combine interface action events. If an interface action is generated by netifd or mwan3 for example ifup, ifdown, connectd or disconnected and this action is configured in the inteface uci section, then the conntrack table is flushed by mwan3. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: add locking debug possibilityFlorian Eckert2019-01-22
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: set interface unknown to offlineFlorian Eckert2019-01-14
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: fix initial_state offline issueFlorian Eckert2019-01-14
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: remove deprecated local_source config optionFlorian Eckert2018-11-08
| | | | | | | This feature is not needed anymore. This feature is replaced by the change 46ed09408e554f182a688e0a7c47cdf85fc6c15d Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: revert add online_metric for local_source noneFlorian Eckert2018-11-08
| | | | | | This is not necessary. This reverts commit be91e71805116ac1fd852a1ac0480737538d0b04.
* net/mwan3: add online_metric for local_source noneFlorian Eckert2018-10-23
| | | | | | | | | | | | | | | | | | | | | If we set the option "local_source" in the globals mwan3 section to "none", traffic generated by the router it self will always use the default route from the wan interface with the lowest metric. If this interface is down the router traffic still uses the connection with the lowest metric but this is disconnected. Load balancing and failover from the lan site is still possible. Only router generated traffic is not load balanced and could not use failover. To solve this issue with router initiated traffic add the additional option "online_metric" to the mwan3 interface section. If the interface is connected then this lower "online metric" is set in the default routing table. With this change we have at least a failover with router initiated traffic. Signed-off-by: Florian Eckert <fe@dev.tdt.de>