aboutsummaryrefslogtreecommitdiff
path: root/net/mwan3
Commit message (Collapse)AuthorAge
...
* mwan3: fix bug when one interface is a prefix of anotherAaron Goodman2020-10-16
| | | | | | | | correctly terminate interface status checks with new lines so that interface status does not get confused when one interface is a prefix of another interface. Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
* mwan3: only update src_iface rules on ifupAaron Goodman2020-10-16
| | | | Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
* mwan3: improvements to route creationAaron Goodman2020-10-16
| | | | | | | | | | | | | | | | | | handle creation of routing tables in mwan3rtmon to avoid race conditions and potentially missing routes handle ipv6 routes that have expiry update directly connected ipset when routes are added or deleted add fall through rules so that the default routing table is not used if no rule in the interface-specific routing table matches add option to comply with mwan3 source based routing get default route parameters from main routing table Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
* mwan3: use MWAN3TRACK_STATUS_DIR variable throughoutAaron Goodman2020-10-16
| | | | Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
* mwan3: fixup some extra spaces and shellcheck warningsAaron Goodman2020-10-16
| | | | Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
* mwan3: improve startup performance; version 2.9.0Aaron Goodman2020-08-17
| | | | | | | | | | | | | | | | | | | | | | 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>
* mwan3: use ip monitor route to detect routing changesAaron Goodman2020-08-15
| | | | | | | | | | | use only committed uci changes for updating routing table use functions.sh functions rather than uci command line tool to find interfaces for routing table. consolidate rtmon_ipv4 and rtmon_ipv6 functions into a single function Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
* treewide: replace `which` with `command -v`Paul Spooren2020-08-09
| | | | | | | | | | Fix shellcheck SC2230 > which is non-standard. Use builtin 'command -v' instead. Once applied to everything concerning OpenWrt we can disable the busybox feature `which` and save 3.8kB. Signed-off-by: Paul Spooren <mail@aparcar.org>
* mwan3: update version to 2.8.12Florian Eckert2020-07-28
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: unify variable checkFlorian Eckert2020-07-28
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: remove lock file entirelyFlorian Eckert2020-07-28
| | | | | | Removing the lock file ist not necessary Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: revert: also cleanup lock on mwan3 stopFlorian Eckert2020-07-28
| | | | | | | | | | | | This reverts commit cde2a77ed3b3b0df9e693e121dccdc97ef163156. Applying this change has shown that it is even quicker to provoke the race condtition on simultan mwan3 commands execution. By reversing the change we have the same behaviour as before. But the race condition on mwan3 execute at the same time still exists. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: fix race condition on mwan3 restartFlorian Eckert2020-07-28
| | | | | | | This adjustment of the locks fixes the race condition when a mwan3 hotplug script and a mwan3 command are running at the same time. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: update version to 2.8.11Florian Eckert2020-07-20
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: add online and uptime to detail outputFlorian Eckert2020-07-20
| | | | | | | Add also online time value and uptime time value from netifd to the detail output view. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: add workaround for procd changeFlorian Eckert2020-07-20
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: also cleanup lock on mwan3 stopFlorian Eckert2020-07-20
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: fix rtmon routing table function generationFlorian Eckert2020-07-20
| | | | | | | | | | | | | | If the uci option family is not set in the interface section, then there is no default value set as in the `config_load / config_get` API. The problem here is that if the family is not set, the default value ipv4 is normaly assumed. But the comparison fails here because the value is empty and therefore the dedicated routing table for this interface is not compared with the other routes from the main table and so not updated. To fix this set the default value for this config option which is`false` for enabled and `ipv4` for family. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: fix IPv6 routing add handlingFlorian Eckert2020-07-19
| | | | | | | | | | | | This fixes routing handling. Introduced with the last version update. The following message disappears on the shell when mwan3 is called with 'mwna3 restart`. `Error: Invalid gateway address.` Signed-off-by: Florian Eckert <fe@dev.tdt.de> [aaronjg@stanford.edu: fully unset variable and handle ipv4 as well] Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
* mwan3: fix idx calculationFlorian Eckert2020-07-19
| | | | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de> [aaronjg@stanford.edu: fix syntax error] Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
* mwan3: version bumpAaron Goodman2020-07-19
| | | | Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
* mwan3: cleanup duplicate ipv4 and ipv6 logicAaron Goodman2020-07-19
| | | | Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
* mwan3: don't send iptable setup failures to /dev/nullAaron Goodman2020-07-19
| | | | | | silencing failing rules makes debugging more difficult Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
* mwan3: add default rule for ipv6 in example configAaron Goodman2020-07-19
| | | | | | | default rule only applied to ipv4 with dest_ip 0.0.0.0/0 and error was hidden when trying to apply it in ip6table Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
* mwan3: don't try to use ipv6 if not installedAaron Goodman2020-07-19
| | | | | | fix issue #11826 Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
* mwan3: be more efficient with sleep after killing trackersAaron Goodman2020-07-16
| | | | Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
* mwan3: don't add single ipv4 to connected list if already covered by a cidrAaron Goodman2020-07-16
| | | | Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
* mwan3: update version to 2.8.9Florian Eckert2020-07-15
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: cleanup function mwan3_create_iface_routeFlorian Eckert2020-07-15
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: fix shellcheck warning SC2086Florian Eckert2020-07-15
| | | | | | | Add double quote to prevent globbing and word splitting where there is no regression. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: fix shellcheck warning SC2166Florian Eckert2020-07-15
| | | | | | Replace -o boolean check with ||. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: remove unused variable complained by shellcheckFlorian Eckert2020-07-15
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: fix shellcheck warning SC2039Florian Eckert2020-07-15
| | | | | | Replace all `==` with `=`. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: move redirect error output to trashFlorian Eckert2020-07-15
| | | | | | | This suppress the following output on `mwan3 restart`: > Dump terminated Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: Fix mwan3 start not doing anythingMichiel Blokzijl2020-07-03
| | | | | | | | | 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>
* mwan3: update version to 2.8.7Florian Eckert2020-06-17
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* 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: switch to procd init scriptFlorian Eckert2020-06-17
| | | | | | This enables the procd handling for mwan3 on config change. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: address reviewer comments on 5147dfc7Aaron Goodman2020-06-13
| | | | Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
* mwan3: Use /128 for ipv6 if no other source address was foundAaron Goodman2020-05-29
| | | | Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
* mwan3: Allow user to specify rules based on source interfaceAaron Goodman2020-05-29
| | | | | | | | | | | | | 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>
* mwan3: Do not mangle outgoing ipv6 pingsAaron Goodman2020-05-29
| | | | Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
* mwan3: version bump to 2.8.6Aaron Goodman2020-05-22
| | | | Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
* mwan3: force busybox pingAaron Goodman2020-05-22
| | | | | | | | | | | | | | | 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>
* mwan3: don't add ipv6 link local address to routing tablesAaron Goodman2020-05-20
| | | | Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
* mwan3: reduce calls to `ip route list'Aaron Goodman2020-05-20
| | | | Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
* mwan3: Update MakefileBrian J. Murrell2020-04-30
| | | Signed-off-by: Brian J. Murrell <brian@interlinx.bc.ca>
* mwan3: Don't use /128 address for ping sourceBrian J. Murrell2020-04-30
| | | | | | | | 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>
* mwan3: fix whitespace issueFlorian Eckert2020-04-27
| | | | | | fixes #11965 Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: Ping IPv6 hosts using address not interfaceBrian J. Murrell2020-03-13
| | | | | | | | | | 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>