Commit Graph

17 Commits

Author SHA1 Message Date
Florian Eckert 474ce50f89 mwan3: add callback on firewall restart
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-12-22 09:22:38 +01:00
Aaron Goodman 24e1504b0b mwan3: improve route flushing on mwan3 stop
only attempt to flush routes for the relevant family

Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
2020-12-16 09:32:33 +01:00
Aaron Goodman b849fc73fb mwan3: add IPKG_INSTROOT to scripts
IPKG_INSTROOT needed for including mwan3 when building images

Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
2020-11-10 08:46:55 -05: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
Florian Eckert 1f1d21ed28 mwan3: make it clearer who initiated the start
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>
2020-11-06 10:41:28 +01: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
Florian Eckert c374711e60 mwan3: fix reload handling
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>
2020-10-23 08:15:57 +02: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 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
Florian Eckert 058a2b6f30 mwan3: add workaround for procd change
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-07-20 08:12:48 +02:00
Florian Eckert a6dc75428c mwan3: switch to procd init script
This enables the procd handling for mwan3 on config change.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-06-17 13:00:48 +02:00
Florian Eckert 2cd5442a11 net/mwan3: fix start/stop/restart execution
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>
2018-09-24 10:20:35 +02:00
Florian Eckert f9a787e8df net/mwan3: add init script to enable/disable mwan3 globally
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>
2018-02-05 10:29:23 +01:00
Adze1502 e1c07f13cc mwan3: update to version 1.5-7
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>
2014-10-02 09:57:50 +02:00
Adze1502 869e4539f6 mwan3: Update to version 1.5-1
Add iptables -w option, which increases stability, requires iptables v1.4.20.
Code cleanup

Signed-off-by: Jeroen Louwes <jeroen.louwes@gmail.com>
2014-08-10 13:18:54 +02:00
Adze1502 7afdbd28cf Add mwan3 to packages feed
Signed-off-by: Jeroen Louwes <jeroen.louwes@gmail.com>
2014-08-08 21:09:54 +02:00