aboutsummaryrefslogtreecommitdiff
path: root/net/mwan3/files/usr/libexec
Commit message (Collapse)AuthorAge
* mwan3: also show tracker state via ubusFlorian Eckert2023-09-20
| | | | | | | | | | | The tracker state is not shown via ubus. Only if the tracker was in active state, then the boolean running was set or not. By adding the tracking state to the ubus information we could also evaluate the state of the tracker. To remain compatible, the runnig flag of the tracker is not removed, which in fact displays the same information, but only if the tracker is in state 'active' or not. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: remove notracking in mwan3track ubus statusFlorian Eckert2023-09-20
| | | | | | | | | | | | | | | | | | | | | | | | | The function 'get_mwan3_status' is reading the internal state from the tracker via the status file. Do not use the state 'notracking' status anymore. If the mwan3track is not running always return 'unknown' and not 'notracking'. There is already an other function that evaluates the external state of the tracker. We have now the following states of the tracker: internal (mwan3track): - offline - online - diconnecting - connecting - disabled - unknown external (via pgrep and config): - paused - active - down - not enabled Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: fix mwan3_connected ubus outputFlorian Eckert2023-09-12
| | | | | | | | During the renameing of mwan3_connected_v4 to mwan3_connected_ipv4 and mwan3_connected_v6 to mwan3_connected_ipv6 the adjustment in the ubus call was forgotten. This commit fixes this. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: move command definitions to common.shFlorian Eckert2022-03-14
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: update ubus status for not tracked interfacesFlorian Eckert2021-05-03
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: don't call rpcd on 'mwan3 interfaces'Aaron Goodman2020-11-16
| | | | | | | 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>
* mwan3: cleanup indenting in rpcd interface statusAaron Goodman2020-11-10
| | | | Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
* mwan3: don't include output from TRACK_OUTUPUT in status callAaron Goodman2020-11-10
| | | | Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
* mwan3: remove unused device lookup in status checkAaron Goodman2020-11-10
| | | | Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
* mwan3: restore +x flag to mwan3 executablesAaron Goodman2020-11-10
| | | | Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
* mwan3: use common makefile install wrappersFlorian Eckert2020-11-06
| | | | | | | 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>
* mwan3: fix rpcd with for routers with no IPv6 supportAaron Goodman2020-10-29
| | | | Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
* mwan3: use procd for mwan3rtmon and mwan3trackAaron Goodman2020-10-16
| | | | | | | | | | | 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>
* mwan3: set status to unknown in rpcd if status file not foundFlorian Eckert2020-06-17
| | | | | | If the status file is not found then set then return the value unknown. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: add netifd up info to mwan3 ubus status outputFlorian Eckert2019-07-04
| | | | | | Add the netifd up status output to the mwan3 ubus status output. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: add enabled info to mwan3 ubus statusFlorian Eckert2019-07-04
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: add interface uptime netifd value to ubus mwan3 status outputFlorian Eckert2019-07-04
| | | | | | Add missing netifd uptime info to ubus status call. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: rename downtime to offlineFlorian Eckert2019-07-04
| | | | | | Rename downtime ubus output from mwan3 to offline. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: rename uptime to onlineFlorian Eckert2019-07-04
| | | | | | Rename uptime ubus output from mwan3 to online. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: add policies view to ubus interfaceFlorian Eckert2018-11-13
| | | | | | | 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>
* net/mwan3: enhance ipset status generationFlorian Eckert2018-10-23
| | | | | | This change should optimize and speed up the status output generation. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* net/mwan3: add downtime ubus informationFlorian Eckert2018-10-12
| | | | | | | 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>
* net/mwan3: add uptime ubus informationFlorian Eckert2018-10-12
| | | | | | | 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>
* mwan3: Packet Loss & Latency CheckNishant Sharma2018-05-11
| | | | | | | 1. Test link quality based on packet loss & latency w.r.t. pre-defined high and low watermark values. 2. Extended ubus support to provide packet loss & latency information per wan per track_ip Signed-off-by: Nishant Sharma <codemarauder@gmail.com>
* mwan3: in ubus rpcd script fix shell local issueFlorian Eckert2018-04-12
| | | | | | | To fix the shell local issue in the ubus mwan3 rpcd shell script, move the switch case statment into a function. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* net/mwan3: use uptime for ubus age infoFlorian Eckert2017-11-16
| | | | | | | | If the date is changed by ntp the age value of mwan3 on ubus could jitter. Use instead the uptime value from /proc/uptime which will not change during system run. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: fix interface-bound traffic when interface is offlineMarcin Jurkowski2017-09-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit fixed what 6d99b602 was supposed to fix without affecting interface-bound traffic. Before 6d99b602 interface-bound traffic was working normally as long as at least one interface was online. However when the last interface went offline, it was impossible to ping and such state was unrecoverable. Commit 6d99b602 fixed unrecoverable offline state problem (it was possible to ping -I iface) but messed inteface-bound traffic. Traffic with interface source address was not working if the interface was in "offline" state, even if another interface was online. The problem was caused by an inconsistent "offline" interface state: iptables-related rules were kept while routing table and policy were deleted. The idea behind this commit is to: 1. Keep all the rules for each interface (iptables, routing table, policy) regardless of its state. This ensures consistency, 2. Make interface state hotplug events affect only iptables' mwan3_policy_* rules. Interface-related iptables, routing table and policy is removed only when mwan3 is manually stopped. To make such changes possible, it's necessary to change the way mwan3_policy_* rule generator keeps track of interface state hotplug events. Until now, it checked for the existence of custom interface-related routing table (table id 1, 2, 3, ...). Clearly we can no longer rely on that so each interface state is stored explicitly in file. Signed-off-by: Marcin Jurkowski <marcin1j@gmail.com>
* net/mwan3: fix ubus json datatypFlorian Eckert2017-08-10
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* net/mwan3: expand ubus to show when last mwan3track check was doneFlorian Eckert2017-08-10
| | | | | | | To know how old the ubus output is, add an age parameter which indicats how old the check informations on the interface are. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* net/mwan3: remove unused global definitionFlorian Eckert2017-08-10
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* net/mwan3: fix mwan3track kill executionFlorian Eckert2017-08-10
| | | | | | | | | If two interface have the same prefix "wan" for example "wan" and "wan1" pgrep returns the PID for wan1 also "pgrep -f mwan3track wan". Before this fix "wan1" was also killed! This is not what we want. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* net/mwan3: fix ubus output for mwan3track running stateFlorian Eckert2017-08-10
| | | | | | Fix ubus output for mwan3track running state Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* net/mwan3: remove absolute path for bin filesFlorian Eckert2017-05-12
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* net/mwan3: remove pid file use pgrep to get pidFlorian Eckert2017-05-12
| | | | | | | | | | | | | | | If mwan3track will not stop immediately after sending the kill signal, the clean_up handler will delete the pid file later while the new mwan3track is already running. This could result in a situation that mwan3track is running more then once because the old mwan3track service could not be killed, because the pid file is missing. Using pgrep to kill all mwan3track for the tracked interface and not using pid file should fix this issue. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* net/mwan3: add status track ubus interfaceFlorian Eckert2017-04-11
Signed-off-by: Florian Eckert <fe@dev.tdt.de>