Commit graph

284 commits

Author SHA1 Message Date
Aaron Goodman
2a1c0e11d4 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>
(cherry picked from commit b7ea19bc96)
2021-05-06 12:20:18 +02:00
Florian Eckert
1103ba54b6 mwan3: update ubus status for not tracked interfaces
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit f1da872cd4)
2021-05-06 12:20:07 +02:00
Florian Eckert
e3e651b11e mwna3: fix whitespace
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit cbc5f0916c)
2021-05-06 12:19:58 +02:00
Florian Eckert
b544e0aa58 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>
(cherry picked from commit 5348732b98)
2021-03-17 14:17:23 +01:00
Florian Eckert
0042f2dfa7 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>
(cherry picked from commit 7cfb282432)
2021-03-01 12:44:22 +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
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
Florian Eckert
0dbbc58cbc mwan3: fix tab
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-12-22 08:38:30 +01:00
Florian Eckert
6133d5a0e9 mwan3: remove unused mwan3_unlock function call
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
Florian Eckert
c085f2648f mwan3: fix MWAN3_STARTUP caller
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-12-22 08:38:30 +01:00
Florian Eckert
8f697b45c8 mwan3: fix whitspace
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-12-22 08:38:30 +01:00
Florian Eckert
8d41e5477f mwan3: fix logger tag in mwan3 init
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-12-22 08:38:25 +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
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
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
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
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
1bfb1a66cd mwan3: support latest iputils ping
iputils upstream changed build params with version s20200821
Latest OpenWRT iputils ping now appears to report the openwrt
version tag, rather than iputils date tag

This commit sends a test ping to localhost to evaluate the
capabilities of iputils ping.

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
Aaron Goodman
a5f3e6bb6b mwan3: don't call rpcd on 'mwan3 interfaces'
Allow `mwan3 interfaces` to get uptime via an internal function and
thus remove the dependency on rpcd for `mwan3 interface` calls.

Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
2020-11-16 11:19:55 -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
321a52862a mwan3: cleanup indenting in rpcd interface status
Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
2020-11-10 09:03:33 -05:00
Aaron Goodman
e405b261d6 mwan3: don't include output from TRACK_OUTUPUT in status call
Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
2020-11-10 08:51:47 -05:00
Aaron Goodman
ebfb7fb9d2 mwan3: report an error code on status failure
Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
2020-11-10 08:51:07 -05:00
Aaron Goodman
c336e5d682 mwan3: remove unused device lookup in status check
Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
2020-11-10 08:50:39 -05: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
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
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
99b4b3a178 mwan3: add logging for ipset errors
Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
2020-11-10 08:44:49 -05:00
Aaron Goodman
9df64276e1 mwan3: remove unneeded ipset setup in hotplug
connected ipset handled on mwan3rtmon, so not needed in hotplug

Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
2020-11-10 08:43:32 -05:00
Aaron Goodman
eb3acf926f mwan3: fix hotplug issues from 1f1d21
Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
2020-11-10 08:42:02 -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
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
Aaron Goodman
bec7a1086f mwan3: reload unreachable/blackhole rules on hotplug
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>
2020-11-06 10:40:54 +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
Florian Eckert
94a25dbd92 mwan3: fix wait conditions in mwan3track
Will only run when no events are pending.

Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
[ Update description and split into own commit ]
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-11-06 10:35:49 +01:00
Florian Eckert
81e6a8fd3b mwan3: move mwan3_init call in mwwan3track into main
Initialize TRACK_OUTPUT has been set after INTERFACE variable initialization.
Move definition into main fixes this issue.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-11-06 10:35:45 +01:00
Florian Eckert
ca7625ef11 mwan3: remove not needes jshn.sh include
Remove not needed jshn.sh include.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-11-06 10:34:53 +01:00
Aaron Goodman
13d22445e4 mwan3: fix rpcd with for routers with no IPv6 support
Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
2020-10-29 23:06:25 -04:00
Aaron Goodman
f1bfda4c37 mwan3: do not wait to process ifup/ifdown events
Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
2020-10-27 23:18:18 -04: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
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
e5dc144968 mwan3: fix mwan3 'use'
Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
2020-10-22 09:41:48 -04:00