Commit graph

113 commits

Author SHA1 Message Date
Florian Eckert
0434407428 mwan3: make mwan3.user executable
This is a fix for the the following change:
3d824ea288

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>
2022-12-19 08:34:54 +01:00
Florian Eckert
8fea564fc9 mwan3: update to 2.11.3
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2022-10-17 15:17:36 +02:00
Denys Yarkovyi
675ecfba89 mwan3: support offload routing modifier
Signed-off-by: Denys Yarkovyi <dyarkovoy@gmail.com>
2022-10-05 05:20:05 -07:00
James White
1a703ed6a6 mwan3: Switch default track_ip targets from Google DNS to Cloudflare DNS
Signed-off-by: James White <james@jmwhite.co.uk>
2022-09-25 09:06:05 +01:00
Florian Eckert
0ed8450d2f mwan3: fix balanced default config
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>
2022-09-14 15:27:16 +02:00
Florian Eckert
87c611abf8 mwan3: fix sticky chain length
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2022-03-28 14:02:18 +02:00
Florian Eckert
c688ffb025 mwan3: update version to 2.11.0
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2022-03-14 11:34:10 +01:00
Florian Eckert
33e70606c6 mwan3: update iptables dependencies
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2022-03-14 09:34:49 +01:00
Florian Eckert
e1f321150d mwan3: fix mwan3 flush conntrack table call
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2021-12-22 09:28:12 +01:00
Brian J. Murrell
3d824ea288 mwan3: Use shebang in /etc/mwan3.user
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>
2021-09-03 11:46:28 +02:00
Florian Eckert
44d79147ea mwan3: bump PKG_VERSION to 2.10.11
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2021-07-08 09:07:52 +02:00
Daniel Golle
cb02b42007
mwan3: use default routes from additional tables
Until now the additional tables listed in gobal 'rt_table_lookup' were
not considered for interfaces.
In order to be able to also use interface-defined routes from tables
other than main, consider also tables listed in 'rt_table_lookup'.
Update version to 2.10.10 as requested by maintainer.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-07-05 18:58:52 +01:00
Aaron Goodman
b7ea19bc96 mwan3: allow interfaces with no tracking IPs
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>
2021-05-02 19:13:44 -04:00
Florian Eckert
5348732b98 mwan3: add connecting and disconnecting event to mwan3track
If the interface goes into failure state (is disconnecting)
then with this change one hotplug.d event is generated.

The same is true for the recovery state (is connecting), when the interface
comes back from a failure state.

In both cases, a hotplug.d event for the iface is triggered. Once
with the $ACTION=disconnecting and once for the $ACTION=connecting.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2021-03-16 09:24:36 +01:00
Florian Eckert
7cfb282432 mwan3: disable DNS lookups for ping checks
By default, ping does a reverse DNS of the IP that you are pinging.
When you have a network issue (such as when a link has just gone down
and you haven't yet marked it down), this lookup can cause failures on
tests for links that are still good.

This option only works for iputils ping.
For busybox the option is not evaluated, but it is accepted without
throwing an error.

Fixes: #14968
Fixes: #14924

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Suggested-by: David Lang <david@lang.hm>
2021-03-01 12:23:43 +01:00
Aaron Goodman
267b65ad9f mwan3: fix regression in ipv6 routing tables
Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
2021-01-02 21:37:37 -05:00
Florian Eckert
06ce040cbe mwan3: update PKG_VERSION
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-12-22 08:38:30 +01:00
Florian Eckert
55051e6c7b mwan3: reinstall missing mwan3.user file
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-12-22 08:38:30 +01:00
Aaron Goodman
85dbb48201 mwan3: update version
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
- Changed version string

Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
2020-12-16 09:35:06 +01:00
Aaron Goodman
8abd5781b9 mwan3: version bump to 2.10.3-3
Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
2020-11-16 11:40:50 -05:00
Aaron Goodman
8cc38f933c mwan3: add maintainer
add @aaronjg as maintener as per conversation with @feckert

Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
2020-11-16 11:23:10 -05:00
Aaron Goodman
f014a7f542 mwan3: don't trigger rpcd install hooks if rpcd not installed
Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
2020-11-16 11:23:10 -05:00
James White
8608afa75f
mwan3: Update documentation information for mwan3.user file
Signed-off-by: James White <james@jmwhite.co.uk>
2020-11-16 10:42:45 +00:00
Aaron Goodman
1ef1491e1a mwan3: remove duplicate Build/Compile from Makefile
Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
2020-11-10 08:46:34 -05:00
Aaron Goodman
d79a6ee985 mwan3: version bump to 2.10.3
Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
2020-11-10 08:46:20 -05:00
Florian Eckert
a756fdcfdf mwan3: update version to 2.10.2
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-11-06 10:48:21 +01:00
Florian Eckert
26fb7129ad mwan3: fix boundary
he line is too long. For the future it is better to split it into
several lines and make it more clearly arranged. In case of a future
change, not the whole line will be marked as a change.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-11-06 10:37:44 +01:00
Florian Eckert
6834f8e3a6 mwan3: use common makefile install wrappers
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>
2020-11-06 10:35:55 +01:00
Aaron Goodman
e5dc144968 mwan3: fix mwan3 'use'
Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
2020-10-22 09:41:48 -04:00
Aaron Goodman
bbbc6127ab mwan3: use helper library for mwan3track
Rather than using a special mwan3 user to manage mwan3track's tracking
packets, this commit implements a small helper library to bind to
device and to set a fwmark so that the tracking packets can be routed
out of the correct interface.

This provides a consistent method for binding to a device rather than
relying on various packages potentially buggy implementations. For
example: #8139 and #12836

This helper issue also allows for more tracking methods to be added
even if they do not have a command line option to bind to device,
such as iperf3 (eg  #13050).

Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
2020-10-16 09:54:48 -04:00
Aaron Goodman
c07f5230be mwan3: improve startup performance; version 2.9.0
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>
2020-08-17 22:02:36 -04:00
Paul Spooren
30ea917518 treewide: replace which with command -v
Fix shellcheck SC2230
> which is non-standard. Use builtin 'command -v' instead.

Once applied to everything concerning OpenWrt we can disable the busybox
feature `which` and save 3.8kB.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2020-08-09 13:58:14 -10:00
Florian Eckert
85e91377cf mwan3: update version to 2.8.12
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-07-28 06:53:24 +02:00
Florian Eckert
f601e6cfa4 mwan3: update version to 2.8.11
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-07-20 08:15:50 +02:00
Aaron Goodman
ca8bc3d115 mwan3: version bump
Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
2020-07-19 23:24:13 -04:00
Florian Eckert
2594258c4b mwan3: update version to 2.8.9
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-07-15 10:23:47 +02:00
Michiel Blokzijl
acfbd98ce0 mwan3: Fix mwan3 start not doing anything
Due to a missing config load function call, mwan3 start runs ifup for an empty
list of interfaces, thus not calling ifup at all.

This commit introduces the missing config_load call.

Signed-off-by: Michiel Blokzijl <code@m01.eu>
2020-07-03 20:03:42 +01:00
Florian Eckert
8030814267 mwan3: update version to 2.8.7
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-06-17 13:04:38 +02:00
Aaron Goodman
b7d1f81f10 mwan3: version bump to 2.8.6
Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
2020-05-22 20:01:49 -04:00
Brian J. Murrell
b017fe34dd mwan3: Update Makefile
Signed-off-by: Brian J. Murrell <brian@interlinx.bc.ca>
2020-04-30 14:55:20 +02:00
Florian Eckert
3c34b151f6 mwan3: fix whitespace issue
fixes #11965

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-04-27 17:58:12 +02:00
Brian J. Murrell
6721587e8b mwan3: Ping IPv6 hosts using address not interface
Pinging IPv6 hosts using an interface as a source specifier seems
troublesome.  See https://bugs.openwrt.org/index.php?do=details&task_id=2897
for more detail.

Use the desired source interface's IP address instead.

Signed-off-by: Brian J. Murrell <brian@interlinx.bc.ca>
2020-03-13 15:24:57 +01:00
Florian Eckert
6d638c3e23 mwan3: change license to SPDX compatible identifier
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2019-11-18 09:26:51 +01:00
Florian Eckert
14dd084662 mwan3: update version to 2.8.2
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2019-11-14 08:01:52 +01:00
yurtesen
94e0c78826 mwan3: Fix json_load fails with some data
Sometimes the return value of `ubus -S call network.interface.wan status`
cause `json_load` to return `Failed to parse message data` error.

To avoid this, the JSON data always should be quoted with double quotes.

Signed-off-by: Evren Yurtesen <eyurtese@abo.fi>
Removed quoatation marks from commit heading
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2019-11-14 07:43:18 +01:00
Daniel A. Maierhofer
1e97156adc mwan3: Add missing IPs to wanb
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>
2019-08-04 18:47:25 +02:00
Florian Eckert
e100de8bd8 mwan3: update version to 2.8.0
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2019-07-04 12:06:27 +02:00
Florian Eckert
171cb17694 mwan3: change flush_conntrack handling to use uci list element
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>
2019-06-03 14:16:05 +02:00
Chen Minqiang
a004d07632 mwan3: fix logical/typo bug in mwan3rtmon
This bug was introduced since dd206b7d0b
mwan3_remon_ipv4 and mwan3_remon_ipv6 is command to run not a variable
I add some comments on them hopefully people will notice it

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
2019-03-22 18:11:07 +08:00
Florian Eckert
27e7e88966 mwan3: fix disconnected event generation in mwan3track
Before this change two disconnected events were generated. This is wrong!
The disconnected event is impliciet generated by the hotplug script on ifdown
event. The mwan3track script is notified by a USR1 signal which
generates the disconnectd event. The additional "disconnectd" event on
ifdown is not required.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2019-02-27 13:50:51 +01:00