aboutsummaryrefslogtreecommitdiff
path: root/net/mwan3
Commit message (Collapse)AuthorAge
...
* net/mwan3: set default mask to 0x3F00Florian Eckert2018-03-29
| | | | | | | | | The IPsec ip route table has the default number 220. If mwan3 has more then 7 bits set (124 interfaces) then if mwan3 down is executed the table is also cleared. To solve this set default max 7 bits in the mmx_mask for mwan3. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: adjust dependency from ip-full to ipHannu Nyman2018-03-23
| | | | | | | | | | | Adjust the dependency from ip-full back to ip. Returning back to "ip" is now possible as busybox does not provide "ip" any more, making "ip" again reference to ip-tiny or ip-full. Reference to discussion in #5747 Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
* net/mwan3: update version to 2.6.11Florian Eckert2018-03-16
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* net/mwan3: update hint in mwan3.user for connected/disconnectedFlorian Eckert2018-03-16
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* net/mwan3: deviate max interface value from mmx_mask valueFlorian Eckert2018-03-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need always three of the firewall mask value for * default routing table * blackhole * unreachable the other will be used for the interfaces. * If we have set the mmx_mask to max 0xFF00 (8 bit set) we could use max 252 interfaces. * If we have set the mmx_mask to min 0x0E00 (3 bit set) we could use max 4 interfaces. Only the ones are counting from the firewall mask value. Minimal three firewall mask bit vaules must be set. Maximal eight firewall mask bit vaules could be set. Table overview mmx_mask value bits vs. max interfaces mmx_mask value bits set 1 -> not usefull mmx_mask value bits set 2 -> not usefull mmx_mask value bits set 3 -> 4 Interfaces (mask example 0x0E) mmx_mask value bits set 4 -> 12 Interfaces mmx_mask value bits set 5 -> 28 Interfaces mmx_mask value bits set 6 -> 60 Interfaces mmx_mask value bits set 7 -> 124 Interfaces mmx_mask value bits set 8 -> 252 Interfaces (mask example 0xFF) Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* net/mwan3: remove unused local variablesFlorian Eckert2018-03-16
| | | | | | Remove unused local variables Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* net/mwan3: add connected/disconnected ACTION to mwan3trackFlorian Eckert2018-03-16
| | | | | | | | | | | | Add a new ACTIONs: * connected ACTION is called once if mwan3track reach all configured track_ips * disconnected ACTION is called once if mwan3track is unable to reach the track_ips The connected/disconnected will called only by mwan3track in opposite the ACTIONs ifup/ifdown will also be called by netifd. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* net/mwan3: add jshn and ip-full to package dependencyFlorian Eckert2018-03-12
| | | | | | | | * The mwan3 scripts sources ". /usr/share/libubox/jshn.sh" * Mwan3 only works if ip-full is installed Error -> "ip: invalid argument '0xfd00/0xff00' to 'fwmark'" Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* net/mwan3: update to version 2.6.10Florian Eckert2018-02-05
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* net/mwan3: add mwan3_init functionFlorian Eckert2018-02-05
| | | | | | | Move all shell commands which are executed during /lib/mwan3/mwan3.sh sourceing into a seperate init function which must be called at first. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* net/mwan3: send SIGKILL to mwan3trackFlorian Eckert2018-02-05
| | | | | | | | In some situation it is not enough to send a SIGTERM to mwan3track to ask service to stop accurate. If this does not work send him a SIGKILL to prevent mwan3track running more then once per interface. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* net/mwan3: add init script to enable/disable mwan3 globallyFlorian Eckert2018-02-05
| | | | | | | Adding a init script to "/etc/init.d/" introduce the possibility to enable/disable mwan3 globally. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: Improve logs when member metric is too bigJakub Janco2017-12-07
| | | | | | | | If metric of member interface is bigger then 256, it is not appended to policy, now at least warn message is printed into syslog Signed-off-by: Jakub Janco <kubco2@gmail.com>
* net/mwan3: update to version 2.6.8Florian Eckert2017-11-22
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* net/mwan3: change usleep to sleep commandFlorian Eckert2017-11-16
| | | | | | fix bug use sleep instead of usleep 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: update to version 2.6.7David Yang2017-11-08
| | | | Signed-off-by: David Yang <mmyangfl@gmail.com>
* mwan3: add check for pingDavid Yang2017-11-08
| | | | Signed-off-by: David Yang <mmyangfl@gmail.com>
* mwan3: reduce dependency on src_ipDavid Yang2017-11-08
| | | | | | | Interfaces may be managed by 3rd-party scripts, thus src_ip may not be always available in uci. Signed-off-by: David Yang <mmyangfl@gmail.com>
* mwan3: fix empty gateway when creating routing tableDavid Yang2017-11-08
| | | | | | | | Interfaces of some PtP protocols do not have a real gateway. In that case ubus may fill them with '0.0.0.0' or even leave it blank. This will cause error when adding new routing rule. Signed-off-by: David Yang <mmyangfl@gmail.com>
* mwan3: reduce unnecessary comparisonsDavid Yang2017-11-08
| | | | Signed-off-by: David Yang <mmyangfl@gmail.com>
* net/mwan3: fix track_ips orderFlorian Eckert2017-09-12
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* net/mwan3: fix mwan3track STATUS if initial_state is offlineFlorian Eckert2017-09-12
| | | | 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: update versionFlorian Eckert2017-09-01
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* net/mwan3: fix /var/state issue in 14-mwan3 hotplugFlorian Eckert2017-09-01
| | | | | | | | Use common function to toggle ip address in /var/state/mwan3. Change also to use toggle function and not set function. If ip address is often changed every change is saved to /var/state/mwan3. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* net/mwan3: if initial_state is offline set status to unknownFlorian Eckert2017-09-01
| | | | | | | To show that the status of the interface is neither offline nor online set the status to unknown. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* net/mwan3: mwan3track skip track ips if realibility is accomplishedFlorian Eckert2017-09-01
| | | | | | | If enough tracking ip are pinged skip the reset. They are not needed anymore to mark the interface as up. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: fix bugs introduced in 815e83d4Marcin Jurkowski2017-08-17
| | | | | | | | | | Fixes the following bugs introduced in commit 815e83d4: - hotplug: invalid parameter order when initial interface state is "online", mwan3track expects initial state to be the third argument - hotplug: missing source ip address when initial interface state is "offline" - mwan3track: source ip address should be the fourth argument Signed-off-by: Marcin Jurkowski <marcin1j@gmail.com>
* net/mwan3: update versionFlorian Eckert2017-08-16
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* net/mwan3: make mwan3 mask configurable over uciFlorian Eckert2017-08-16
| | | | | | Add new global config option mmx_mask. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* net/mwan3: update versionFlorian Eckert2017-08-10
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* net/mwan3: add hotplug script for hidden self interface generationFlorian Eckert2017-08-10
| | | | | | | | | | | | | | Add new globals config section with option local_source. With this config option the self interface generation will be done now automatically on hotplug event. You can specify which interface (ip) sould be used for router traffic. To replace the self intereface in the config set local_source to "lan". The default option is none, so it will not change default behavior if a "self" interface is configured in the network section. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* net/mwan3: add Makefile postinst and postrm for rpcdFlorian Eckert2017-08-10
| | | | | | Restart rpcd on package install/remove Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* net/mwan3: fix ipset generation in hotplug script with an lockFlorian Eckert2017-08-10
| | | | | | Fix critical section during hotplug events. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* 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: on startup mark interface online only if track_ip are reachableFlorian Eckert2017-08-10
| | | | | | | | | | | | | | | | Add new interface config option "inital_state". If interface comeing up the first time(mwan3 start, boot), there are now two option for interface behaviour: - online (default as is now) Set up interface regardless wether tracking ip are reachable or not. - offline Set up interface first to ping tracking ip and if they are reachable set up the interface completely. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* net/mwan3: fix ping issue if last interface recovers from failureFlorian Eckert2017-08-10
| | | | | | | | | | | Even though error was fixed the interface checks still fails, if last_resort was set to blackhole or unreachable. To fix this issue do not remove failure interface from iptables change on down event. Reported-by: Colby Whitney <colby.whitney@luxul.com> Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* net/mwan3: move mwan3track clean up to mwan3 cmdFlorian Eckert2017-08-10
| | | | | | This is usefull to see the last state of the interface with ubus. 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: change logging output on hotplug interface eventFlorian Eckert2017-08-10
| | | | | | Change logging output on hotplug interface event Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* net/mwan3: add option keep_failure_interval on failureFlorian Eckert2017-08-10
| | | | | | | Add new boolean interface config param to keep ping failure interval during interface failure state. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* net/mwan3: add process PID to LOG outputFlorian Eckert2017-08-10
| | | | | | Update log output macro to show PID during logging Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* mwan3: allow to change mwan3's MARKing maskLars Schumann2017-08-04
| | | | Signed-off-by: Lars Schumann <larsi.org@gmail.com>
* mwan3: support various interface tracking methodsMarcin Jurkowski2017-08-02
| | | | | | | | | | | | Adds support for interface tracking using either ping, arping or httping. This allows to track interface status on networks with filtered ICMP traffic or simply to monitor data link layer etc. To facilitate binding to a specified interface its IP address is passed as a new mwan3track parameter. It's currently required by httping and possibly by other tools that may be added in the future. Signed-off-by: Marcin Jurkowski <marcin1j@gmail.com>
* net/mwan3: update versionFlorian Eckert2017-06-22
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* net/mwan3: simplify tracking status statement commandFlorian Eckert2017-06-22
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>