aboutsummaryrefslogtreecommitdiff
path: root/net/mwan3
Commit message (Collapse)AuthorAge
* mwan3: check removed route before removalJonas Lochmann2024-02-20
| | | | | | | | | | This makes mwan3rtmon check if mwan3_get_routes returns a route before removing it. This helps with IPv6 routes with source address selector removal where multiple original routes are transformed to the same mwan3 route if one of the source routes is removed while the others are kept. Signed-off-by: Jonas Lochmann <git@inkompetenz.org>
* mwan3: use network_get_preferred_ipaddr6Jonas Lochmann2024-02-04
| | | | | | | | | | This updates mwan3 to use network_get_preferred_ipaddr6 instead of network_get_ipaddr6 if possible to determine a source ip for the connectivity checks. This avoids issues where the first ip address that is returned from network_get_ipaddr6 does not work anymore while the preferred one returned from network_get_preferred_ipaddr6 works. Signed-off-by: Jonas Lochmann <git@inkompetenz.org>
* mwan3: refactoring mwan3_report_iface_status outputFlorian Eckert2023-09-20
| | | | | | | | | | The tracking and interface status was mixed up in the report. To fix this, the interface status and the tracking status are now used directly. The online, uptime and error information are appended to the status line if needed. If certain routing tables and routing rules are missing, the error number is also given. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: also show tracker state via ubusFlorian Eckert2023-09-20
| | | | | | | | | | | The tracker state is not shown via ubus. Only if the tracker was in active state, then the boolean running was set or not. By adding the tracking state to the ubus information we could also evaluate the state of the tracker. To remain compatible, the runnig flag of the tracker is not removed, which in fact displays the same information, but only if the tracker is in state 'active' or not. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: rename tracking state from 'not enabled' to 'disabled'Florian Eckert2023-09-20
| | | | | | | | The expression 'disabled' is more meaningful than 'not enabled' and can therefore be better processed in the ubus output, since it is only one word. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: remove notracking in mwan3track ubus statusFlorian Eckert2023-09-20
| | | | | | | | | | | | | | | | | | | | | | | | | The function 'get_mwan3_status' is reading the internal state from the tracker via the status file. Do not use the state 'notracking' status anymore. If the mwan3track is not running always return 'unknown' and not 'notracking'. There is already an other function that evaluates the external state of the tracker. We have now the following states of the tracker: internal (mwan3track): - offline - online - diconnecting - connecting - disabled - unknown external (via pgrep and config): - paused - active - down - not enabled Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: fix mwan3_connected ubus outputFlorian Eckert2023-09-12
| | | | | | | | During the renameing of mwan3_connected_v4 to mwan3_connected_ipv4 and mwan3_connected_v6 to mwan3_connected_ipv6 the adjustment in the ubus call was forgotten. This commit fixes this. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: bump PKG_VERSION to 2.11.7Anna Tikhomirova2023-05-08
| | | | Signed-off-by: Anna Tikhomirova <vamp@vampik.ru>
* mwan3: reset score to up+down on connectedFlorian Eckert2023-05-08
| | | | | | | | | | Set the score value to the maximum value when the connected function is called. The same happens with a disconnected event, the score value is there set to zero. Suggested-by: Anna Tikhomirova <vamp@vampik.ru> Suggested-by: Maxim Mikityanskiy <maxtram95@gmail.com> Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: refactoring mwan3track action handlingFlorian Eckert2023-05-08
| | | | | | | | Refactoring the score handling, so that only one action could take place during run. The behaviour should be more comprehensible, since several score actions are not processed at the same time. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: bump PKG_VERSION to 2.11.6Anna Tikhomirova2023-05-04
| | | | Signed-off-by: Anna Tikhomirova <vamp@vampik.ru>
* mwan3: fix addition of routes to mwan3_connected ipsetAnna Tikhomirova2023-05-04
| | | | | | | | | | Addition of routes to mwan3_connected ipset is broken. The ipset name was changed from mwan3_connected_v4/6 to mwan3_connected_ipv4/6, but this change was not reflected in mwan3rtmon. Signed-off-by: Anna Tikhomirova <vamp@vampik.ru> * Update commit message Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: bump PKG_VERSION to 2.11.5Anna Tikhomirova2023-05-04
| | | | Signed-off-by: Anna Tikhomirova <vamp@vampik.ru>
* mwan3: fix addition of iptables rules for mwan3 sticky rulesAnna Tikhomirova2023-05-04
| | | | | | | | | | | Addition of iptables rules for mwan3 sticky rules is broken, resulting in non-working sticky rules. The required parameters for the function 'mwan3_set_sticky_iptables' were passed in the wrong order. Signed-off-by: Anna Tikhomirova <vamp@vampik.ru> * Update commit message * Quoting function arguments Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* 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: update to 2.11.3Florian Eckert2022-10-17
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: only send disconnected event if interface was connected beforeFlorian Eckert2022-10-17
| | | | | | | | Up to now on every interface down event a mwan3 disconnected event was send. This is wrong because if the interface was never connected, then a disconnected event should not get generated. This commit fixes this bug. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: change log message on already added routeFlorian Eckert2022-10-17
| | | | | | Only show message on already set route, if debugging is enabled. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: support offload routing modifierDenys Yarkovyi2022-10-05
| | | | Signed-off-by: Denys Yarkovyi <dyarkovoy@gmail.com>
* 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: fix sticky chain lengthFlorian Eckert2022-03-28
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: update version to 2.11.0Florian Eckert2022-03-14
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: dump iptables and ipset command for debuggingFlorian Eckert2022-03-14
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: unify error messagesFlorian Eckert2022-03-14
| | | | 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: use mwan3_push_update function for mwan3_delete_iface_iptablesFlorian Eckert2022-03-14
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: remove ipset generation from mwan3_set_general_iptablesFlorian Eckert2022-03-14
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: use sticky ipset generation mwan3_push_update patternFlorian Eckert2022-03-14
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: do not create dynamic ipset for IPv6 if not supportedFlorian Eckert2022-03-14
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: do not add mwan3_custom_v6 set if ipv6 is not availableFlorian Eckert2022-03-14
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: use also ipset restore for connected ipv4 setsFlorian Eckert2022-03-14
| | | | 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: update iptables dependenciesFlorian 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>
* mwan3: bump PKG_VERSION to 2.10.11Florian Eckert2021-07-08
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: add troublshoot command from LuCIFlorian Eckert2021-07-08
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: cleanup help outputFlorian Eckert2021-07-08
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: use default routes from additional tablesDaniel Golle2021-07-05
| | | | | | | | | | 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>
* 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>
* | mwan3: update ubus status for not tracked interfacesFlorian Eckert2021-05-03
| | | | | | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* | mwna3: fix whitespaceFlorian Eckert2021-05-03
|/ | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: add connecting and disconnecting event to mwan3trackFlorian Eckert2021-03-16
| | | | | | | | | | | | | 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>
* mwan3: disable DNS lookups for ping checksFlorian Eckert2021-03-01
| | | | | | | | | | | | | | | | | 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>
* mwan3: fix regression in ipv6 routing tablesAaron Goodman2021-01-02
| | | | Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
* mwan3: update PKG_VERSIONFlorian Eckert2020-12-22
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>