1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-15 11:53:59 +02:00
Commit Graph

23 Commits

Author SHA1 Message Date
Jonas Lochmann
e119a57e97 mwan3: check removed route before removal
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>
2024-02-20 21:53:22 +01:00
Anna Tikhomirova
84b3de9eda mwan3: fix addition of routes to mwan3_connected ipset
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>
2023-05-04 12:00:27 +02:00
Florian Eckert
a49d0953dc mwan3: move command definitions to common.sh
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2022-03-14 09:34:49 +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
2f58865a01 mwan3: fix string check for active_tbls
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-12-22 08:38:30 +01:00
Aaron Goodman
c6fce89bf7 mwan3: add more error logging to routing functions
Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
2020-12-16 09:32:44 +01:00
Aaron Goodman
21ac1b2c3e mwan3: fix race condition in route loading
Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
2020-12-16 09:32:13 +01:00
Aaron Goodman
5691ff247f mwan3: fix linkdown routes not being added
Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
2020-12-16 09:32:02 +01:00
Aaron Goodman
a870bd70a9 mwan3: restore +x flag to mwan3 executables
Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
2020-11-10 08:45:46 -05:00
Aaron Goodman
59d12598b5 mwan3: use procd for locking everywhere
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)
2020-11-06 10:40:57 +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
8d4e202fa4 mwan3: fix mwan3 route handling
- support trailing route space from iproute2
- add routes even when iface is down
- fix source_routing argument check
- add quotes in logging to better detect issues with trailing spaces

Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
2020-10-27 21:40:06 -04:00
Aaron Goodman
566293d228 mwan3: use procd for mwan3rtmon and mwan3track
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>
2020-10-16 09:54:48 -04:00
Aaron Goodman
c8deccc0e7 mwan3: improvements to route creation
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>
2020-10-16 09:54:48 -04:00
Aaron Goodman
b7e26dd431 mwan3: fixup some extra spaces and shellcheck warnings
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
Aaron Goodman
39f58789e6 mwan3: use ip monitor route to detect routing changes
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>
2020-08-15 20:19:56 -04: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
2ff9c8ecb7 mwan3: add locking debug possibility
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2019-01-22 14:29:04 +01:00
Florian Eckert
dd206b7d0b mwan3: lock critical mwan3rtmon section
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2019-01-22 14:28:58 +01:00
Florian Eckert
46b2593ce4 mwan3: mwan3rtmon interrupt sleep on signal (trap) event
Sleep will be aborted if a signal is send to this process.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2019-01-14 08:28:55 +01:00
Chen Minqiang
7817aced2b mwan3: mwan3rtmon sleep time configurable
Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
2018-08-09 05:06:17 +08:00
Chen Minqiang
46ed09408e mwan3: refine link selection
- 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>
2018-08-09 05:06:17 +08:00