Commit graph

202 commits

Author SHA1 Message Date
Aaron Goodman
d6b051b8c0 mwan3: don't add single ipv4 to connected list if already covered by a cidr
Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
(cherry picked from commit da9a626f78)
2020-07-27 12:18:18 +02:00
Florian Eckert
f834ba0fce mwan3: update version to 2.8.9
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit 2594258c4b)
2020-07-27 12:18:00 +02:00
Florian Eckert
2f2044ecb0 mwan3: cleanup function mwan3_create_iface_route
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit d0c248a7da)
2020-07-27 12:17:51 +02:00
Florian Eckert
db3c8326fe mwan3: fix shellcheck warning SC2086
Add double quote to prevent globbing and word splitting where there is
no regression.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit feae9e5742)
2020-07-27 12:17:40 +02:00
Florian Eckert
7d0f2cdb63 mwan3: fix shellcheck warning SC2166
Replace -o boolean check with ||.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit c0fdfaa174)
2020-07-27 12:17:31 +02:00
Florian Eckert
c0b111feab mwan3: remove unused variable complained by shellcheck
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit 644d9a25df)
2020-07-27 12:17:22 +02:00
Florian Eckert
3443eb3c7d mwan3: fix shellcheck warning SC2039
Replace all `==` with `=`.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit 0ed7524f81)
2020-07-27 12:17:11 +02:00
Florian Eckert
be8f287aaa mwan3: move redirect error output to trash
This suppress the following output on `mwan3 restart`:
> Dump terminated

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit facf8ea299)
2020-07-27 12:17:01 +02:00
Michiel Blokzijl
86d2bfe022 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>
(cherry picked from commit acfbd98ce0)
2020-07-06 08:58:45 +02:00
Florian Eckert
b74d5e9c17 mwan3: update version to 2.8.7
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit 8030814267)
2020-07-06 08:58:45 +02:00
Florian Eckert
4f394c2590 mwan3: set status to unknown in rpcd if status file not found
If the status file is not found then set then return the value unknown.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit e30f16beef)
2020-07-06 08:58:45 +02:00
Florian Eckert
f7749c663b 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>
(cherry picked from commit a6dc75428c)
2020-07-06 08:58:45 +02:00
Aaron Goodman
0498a2b357 mwan3: address reviewer comments on 5147dfc7
Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
(cherry picked from commit 38be40843b)
2020-07-06 08:58:45 +02:00
Aaron Goodman
cc1bb3e8b9 mwan3: Use /128 for ipv6 if no other source address was found
Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
(cherry picked from commit 4efaa44b21)
2020-07-06 08:58:45 +02:00
Aaron Goodman
74b6f10845 mwan3: Allow user to specify rules based on source interface
Add an option for adding rules based on source interface.
The default 0.0.0.0/0 src and destination ip addresses has been removed. It is unclear
how the 'any' family of rules would have worked, as it appears each rule always required an
ipv4 or ipv6 address src and destination address.  With this change, the any family will work
again.

I also cleaned up a bunch of repeated code around adding the iptables rules for
ipv4/ipv6/any in making the change.

Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
(cherry picked from commit 5147dfc73a)
2020-07-06 08:58:45 +02:00
Aaron Goodman
c14e74a5a8 mwan3: Do not mangle outgoing ipv6 pings
Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
(cherry picked from commit cf38136b00)
2020-07-06 08:58:45 +02:00
Aaron Goodman
465baa46c3 mwan3: version bump to 2.8.6
Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
(cherry picked from commit b7d1f81f10)
2020-07-06 08:58:45 +02:00
Aaron Goodman
19bebd3d89 mwan3: force busybox ping
openwrt 19.07 uses iputils 20101006-1

This ancient version of iputils has a bug where the -I option is not respected.

https://github.com/iputils/iputils/issues/55
https://github.com/iputils/iputils/issues/56
https://bugs.openwrt.org/index.php?do=details&task_id=1486

Thus, we should force using busybox ping at "/bin/ping" until the iputils
version gets an upgrade in the next major release

Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
(cherry picked from commit 35a86bdc11)
2020-07-06 08:58:45 +02:00
Aaron Goodman
ffce45e365 mwan3: don't add ipv6 link local address to routing tables
Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
(cherry picked from commit aafdd0730c)
2020-07-06 08:58:45 +02:00
Aaron Goodman
a3c399d01f mwan3: reduce calls to `ip route list'
Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
(cherry picked from commit 02ebd831c1)
2020-07-06 08:58:45 +02:00
Brian J. Murrell
4af28cc681 mwan3: Update Makefile
Signed-off-by: Brian J. Murrell <brian@interlinx.bc.ca>
(cherry picked from commit b017fe34dd)
2020-07-06 08:58:45 +02:00
Brian J. Murrell
0693f0c9e3 mwan3: Don't use /128 address for ping source
An interface can have both a /64 and a /128 from a provider.

In such a case, use the address from the /64 to do the ping check, not
the /128.

Signed-off-by: Brian J. Murrell <brian@interlinx.bc.ca>
(cherry picked from commit 49cf5eac5c)
2020-07-06 08:58:45 +02:00
Florian Eckert
0d795d2028 mwan3: fix whitespace issue
fixes #11965

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit 3c34b151f6)
2020-04-28 17:10:32 +02:00
Brian J. Murrell
b7959a8d38 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>
(cherry picked from commit 6721587e8b)
2020-04-28 17:10:32 +02:00
Florian Eckert
2ac0a05d6c mwan3: change license to SPDX compatible identifier
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit 6d638c3e23)
2020-04-28 17:10:32 +02:00
Florian Eckert
928ac2a20a mwan3: update version to 2.8.2
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit 14dd084662)
2020-04-28 17:10:32 +02:00
Florian Eckert
1ea75a8fa5 mwan3: add httping_ssl option
Till now we could only ping http targets on port 80. With this change by
adding the config boolean config option httping_ssl we could also ping
https ping targets on port 443.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit a689e168aa)
2020-04-28 17:10:32 +02:00
Florian Eckert
c2cd3f0997 mwan3: fix variable naming
The variable IPT is not valid at this point. Set the variable usage to IPT4
fixes this issue.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit 581d7df844)
2020-04-28 17:10:32 +02:00
Florian Eckert
0f67fc96d8 mwan3: sync PKG_RELEASE number and PKG_VERSION with master
Since the merge of the luci master branch into the luci openwrt.19.07 branch,
the ubus API was not in sync anymore. So all commits from the master
branch where backported into the openwrt-19.07 branch. But this could
not be done linear. There were already some fixes cherry-picked from the
master and the version does not match anymore. This commit syncronized
the PKG_VERSION and the PKG_RELEASE again to make clear that the
version in master and openwrt-19.07 are even again and have so the
same software version until to this commit.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2019-11-15 09:59:09 +01:00
Daniel A. Maierhofer
62c9688adc 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>
(cherry picked from commit 1e97156adc)
2019-11-15 09:57:20 +01:00
Florian Eckert
aa5a583869 mwan3: update version to 2.8.0
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit e100de8bd8)
2019-11-15 09:56:29 +01:00
Florian Eckert
e842ea3941 mwan3: add netifd up info to mwan3 ubus status output
Add the netifd up status output to the mwan3 ubus status output.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit 27db561752)
2019-11-15 09:51:50 +01:00
Florian Eckert
f20b96e4a5 mwan3: add enabled info to mwan3 ubus status
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit cfba93a203)
2019-11-15 09:49:39 +01:00
Florian Eckert
0c25f7a51c mwan3: add interface uptime netifd value to ubus mwan3 status output
Add missing netifd uptime info to ubus status call.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit bfa849c14e)
2019-11-15 09:40:15 +01:00
Florian Eckert
3371703487 mwan3: rename downtime to offline
Rename downtime ubus output from mwan3 to offline.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit 6c2cd78c6f)
2019-11-15 09:39:41 +01:00
Florian Eckert
aa05eb448b mwan3: rename uptime to online
Rename uptime ubus output from mwan3 to online.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit 3be40786f5)
2019-11-15 09:39:17 +01:00
yurtesen
84756e7f60 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>
Update the version string from 2.8.1 (master) to 2.7.15 (openwrt-19.07)
(cherry picked from commit 94e0c78826)
2019-11-14 07:52:27 +01:00
Florian Eckert
3f088f2535 mwan3: add migration script for flush_conntrack config
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit 8d3c8dadcf)
2019-07-09 16:05:48 +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
Florian Eckert
7b4c075cc2 mwan3: update version to 2.7.10
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2019-01-22 14:29:34 +01: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
d167e3718d mwan3: lock critical section on mwan3 down
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2019-01-22 14:29:01 +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
b2c4f2b135 mwan3: update version to 2.7.9
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2019-01-14 08: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
Florian Eckert
10cadcb2af mwan3: set interface unknown to offline
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2019-01-14 08:28:53 +01:00
Florian Eckert
9362ef30ff mwan3: fix initial_state offline issue
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2019-01-14 08:28:52 +01:00
Florian Eckert
a974558cfa mwan3: add syslog debug possibility to rules
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2019-01-14 08:28:50 +01:00