Commit Graph

178 Commits

Author SHA1 Message Date
Brian J. Murrell 6721587e8b 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>
2020-03-13 15:24:57 +01:00
Florian Eckert 6d638c3e23 mwan3: change license to SPDX compatible identifier
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2019-11-18 09:26:51 +01:00
Florian Eckert 14dd084662 mwan3: update version to 2.8.2
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2019-11-14 08:01:52 +01:00
Florian Eckert a689e168aa 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>
2019-11-14 07:57:11 +01:00
Florian Eckert 581d7df844 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>
2019-11-14 07:57:11 +01:00
yurtesen 94e0c78826 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>
2019-11-14 07:43:18 +01:00
Daniel A. Maierhofer 1e97156adc 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>
2019-08-04 18:47:25 +02:00
Florian Eckert e100de8bd8 mwan3: update version to 2.8.0
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2019-07-04 12:06:27 +02:00
Florian Eckert 27db561752 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>
2019-07-04 12:03:43 +02:00
Florian Eckert cfba93a203 mwan3: add enabled info to mwan3 ubus status
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2019-07-04 12:03:40 +02:00
Florian Eckert bfa849c14e 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>
2019-07-04 12:03:37 +02:00
Florian Eckert 6c2cd78c6f mwan3: rename downtime to offline
Rename downtime ubus output from mwan3 to offline.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2019-07-04 12:03:34 +02:00
Florian Eckert 3be40786f5 mwan3: rename uptime to online
Rename uptime ubus output from mwan3 to online.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2019-07-04 12:03:30 +02:00
Florian Eckert 8d3c8dadcf mwan3: add migration script for flush_conntrack config
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2019-07-04 12:03:23 +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
Florian Eckert cb37a0e15b mwan3: update version to 2.7.8
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2018-12-25 18:27:49 +01:00
Florian Eckert a49d609635 mwan3: remove duplicated global enable check
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2018-12-25 18:25:38 +01:00
Florian Eckert f54c2f3157 mwan3: remove local_source deprecated code artefacts
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2018-12-25 18:24:16 +01:00
Michael Stoll 7acb0c3e38 mwan3: add nping to tracking method
Signed-off-by: Michael Stoll <michael.stoll@meadow-robotics.com>
2018-12-21 11:21:31 +01:00
Florian Eckert ce123d3e83 mwan3: add policies view to ubus interface
Add to ubus the missing output information "policies" which could already
be observed with the command "mwan3 status".

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2018-11-13 16:04:26 +01:00
Florian Eckert 5d0406915e mwan3: update version to 2.7.6
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2018-11-08 12:29:15 +01:00
Florian Eckert ac5895cd7f mwan3: remove deprecated local_source config option
This feature is not needed anymore. This feature is replaced by the
change 46ed09408e

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2018-11-08 12:29:15 +01:00
Florian Eckert 85a6d89b8e mwan3: revert add online_metric for local_source none
This is not necessary.

This reverts commit be91e71805.
2018-11-08 12:29:12 +01:00
Florian Eckert 8b28ab282b net/mwan3: update version to 2.7.5
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2018-10-23 15:18:45 +02:00
Florian Eckert be91e71805 net/mwan3: add online_metric for local_source none
If we set the option "local_source" in the globals mwan3 section to "none",
traffic generated by the router it self will always use the default route from
the wan interface with the lowest metric. If this interface is down
the router traffic still uses the connection with the lowest metric but
this is disconnected. Load balancing and failover from the lan site is
still possible. Only router generated traffic is not load balanced and
could not use failover.

To solve this issue with router initiated traffic add the additional
option "online_metric" to the mwan3 interface section.

If the interface is connected then this lower "online metric" is set in the
default routing table.

With this change we have at least a failover with router initiated
traffic.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2018-10-23 15:00:11 +02:00
Florian Eckert 181174b64b net/mwan3: add dynamic ipsets to mwan3_connected ipsets
During runntime of mwan3 we could add dynamicly networks to this ipset
which would then treated as connected networks by mwan3.

This is also usefull for ipsec.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2018-10-23 14:57:33 +02:00
Florian Eckert dcb7ad17ba net/mwan3: add custom address from ip tables to connected ipset
With the list param "rt_table_lookup" in the mwan3 section globals,
it is now possible to add a additional routing table numbers which would get
also parsed and will be added to the connected network.
So mwan3 will treat them as they are directly connected to this device.

This could be usefull if we use ipsec.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2018-10-23 14:49:34 +02:00
Florian Eckert 1335e4f3dd net/mwan3: cleanup egrep ipv6 regex
The IPv6 egrep regex is confusing and hard to maintain.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2018-10-23 14:47:50 +02:00
Florian Eckert 84007a2723 net/mwan3: enhance ipset status generation
This change should optimize and speed up the status output generation.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2018-10-23 14:47:10 +02:00
Florian Eckert ac8c4512d1 net/mwan3: reduce duplicate code
The generation for reporting the policies uses the same code add a
common function to reduce duplication.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2018-10-23 14:44:29 +02:00
Florian Eckert 952f3e1361 net/mwan3: cleanup/prettify 80 characters code boundary
Prettify and cleanup source

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2018-10-23 14:43:37 +02:00
Florian Eckert eeef66cec2 net/mwan3: update version to 2.7.4
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2018-10-12 08:15:38 +02:00
Florian Eckert 1ee9fb4aff net/mwan3: add downtime ubus information
Get downtime information for the tracked mwan3 wan interfaces.
The information shows how long this interface is in disconnected state.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2018-10-12 08:15:36 +02:00
Florian Eckert 1236003733 net/mwan3: add uptime ubus information
Get uptime information for the tracked mwan3 wan interfaces.
The information shows how long this interface is in connected state.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2018-10-12 08:15:33 +02:00
Florian Eckert 3a5c3e03e2 net/mwan3: also add the metric to the default interface routing table
This is now the same route as in the main table.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2018-10-12 08:13:46 +02:00
Kyson Lok 8c0ed00c39 net/mwan3: fixup parse json_load an null message
If a interface is down, call ubus will return an null message which is
used to json_load, it causes json_get_vars gets value from last load and
l3_device various is nonzero.

Signed-off-by: Kyson Lok <kysonlok@gmail.com>
2018-10-12 08:13:42 +02:00
Chen Minqiang dbebe3d6f9 net/mwan3: update version to 2.7.3
Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
2018-10-10 15:54:42 +08:00
Chen Minqiang 8ae2889674 mwan3: rtmon: filter out linkdown routing table
Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
2018-10-10 07:30:47 +08:00
Florian Eckert 692ed62382 net/mwan3: update version to 2.7.2
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2018-09-24 10:21:43 +02:00