mwan3: ipv6-compatible default conf 5862/head
authorLuiz Angelo Daros de Luca <luizluca@gmail.com>
Mon, 2 Apr 2018 02:16:17 +0000 (23:16 -0300)
committerLuiz Angelo Daros de Luca <luizluca@gmail.com>
Tue, 3 Apr 2018 16:35:28 +0000 (13:35 -0300)
Considering that ipv6 NPT/NAT/NETMAP is done manually by user,
mwan3 can balance ipv6 interfaces as it does with ipv4.

Interface wan2 was renamed to wanb as wan2, wan3, ... will eventually
colide with OpenWrt with default wan6 interface when more than 6
interfaces are in use.

New interfaces, members for wan6 and wanb6 where created, both disabled
by default. Policies where adapted as well.

The option "family" is set respectively in each interface. When missing,
mwan3 assumes ipv4, that will fail when interface is IPv6 only.

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
net/mwan3/Makefile
net/mwan3/files/etc/config/mwan3

index 6e839974069ca1a6bde3115464466bb01e9ba931..ee4b034031fcdea1d877ab0415d8b256951db370 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mwan3
 PKG_VERSION:=2.6.12
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_MAINTAINER:=Florian Eckert <fe@dev.tdt.de>
 PKG_LICENSE:=GPLv2
 
index bf089baf102bd26fd0577029bd69aabd5c3fb295..2fd16bb297c4d385b946cb7b73e72389372bea56 100644 (file)
@@ -9,6 +9,7 @@ config interface 'wan'
        list track_ip '8.8.8.8'
        list track_ip '208.67.222.222'
        list track_ip '208.67.220.220'
+       option family 'ipv4'
        option reliability '2'
        option count '1'
        option timeout '2'
@@ -16,10 +17,37 @@ config interface 'wan'
        option down '3'
        option up '8'
 
-config interface 'wan2'
+config interface 'wan6'
+       option enabled '0'
+       list track_ip '2001:4860:4860::8844'
+       list track_ip '2001:4860:4860::8888'
+       list track_ip '2620:0:ccd::2'
+       list track_ip '2620:0:ccc::2'
+       option family 'ipv6'
+       option reliability '2'
+       option count '1'
+       option timeout '2'
+       option interval '5'
+       option down '3'
+       option up '8'
+
+config interface 'wanb'
        option enabled '0'
        list track_ip '8.8.8.8'
        list track_ip '208.67.220.220'
+       option family 'ipv4'
+       option reliability '1'
+       option count '1'
+       option timeout '2'
+       option interval '5'
+       option down '3'
+       option up '8'
+
+config interface 'wanb6'
+       option enabled '0'
+       list track_ip '2001:4860:4860::8888'
+       list track_ip '2620:0:ccc::2'
+       option family 'ipv6'
        option reliability '1'
        option count '1'
        option timeout '2'
@@ -37,33 +65,61 @@ config member 'wan_m2_w3'
        option metric '2'
        option weight '3'
 
-config member 'wan2_m1_w2'
-       option interface 'wan2'
+config member 'wanb_m1_w2'
+       option interface 'wanb'
+       option metric '1'
+       option weight '2'
+
+config member 'wanb_m2_w2'
+       option interface 'wanb'
+       option metric '2'
+       option weight '2'
+
+config member 'wan6_m1_w3'
+       option interface 'wan6'
+       option metric '1'
+       option weight '3'
+
+config member 'wan6_m2_w3'
+       option interface 'wan6'
+       option metric '2'
+       option weight '3'
+
+config member 'wanb6_m1_w2'
+       option interface 'wanb6'
        option metric '1'
        option weight '2'
 
-config member 'wan2_m2_w2'
-       option interface 'wan2'
+config member 'wanb6_m2_w2'
+       option interface 'wanb6'
        option metric '2'
        option weight '2'
 
 config policy 'wan_only'
        list use_member 'wan_m1_w3'
+       list use_member 'wan6_m1_w3'
 
-config policy 'wan2_only'
-       list use_member 'wan2_m1_w2'
+config policy 'wanb_only'
+       list use_member 'wanb_m1_w2'
+       list use_member 'wanb6_m1_w2'
 
 config policy 'balanced'
        list use_member 'wan_m1_w3'
-       list use_member 'wan2_m1_w2'
+       list use_member 'wanb_m1_w2'
+       list use_member 'wan6_m1_w3'
+       list use_member 'wanb6_m1_w2'
 
-config policy 'wan_wan2'
+config policy 'wan_wanb'
        list use_member 'wan_m1_w3'
-       list use_member 'wan2_m2_w2'
+       list use_member 'wanb_m2_w2'
+       list use_member 'wan6_m1_w3'
+       list use_member 'wanb6_m2_w2'
 
-config policy 'wan2_wan'
+config policy 'wanb_wan'
        list use_member 'wan_m2_w3'
-       list use_member 'wan2_m1_w2'
+       list use_member 'wanb_m1_w2'
+       list use_member 'wan6_m2_w3'
+       list use_member 'wanb6_m1_w2'
 
 config rule 'https'
        option sticky '1'