1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00
This commit is contained in:
Ycarus 2018-02-23 17:33:00 +01:00
parent 3e87739229
commit 2995a4d982
3 changed files with 19 additions and 13 deletions

View file

@ -5,8 +5,6 @@
# Author: Mario Krueger <openwrt at xedp3x.de> # Author: Mario Krueger <openwrt at xedp3x.de>
# Released under GPL 3 or later # Released under GPL 3 or later
[ "$ACTION" = ifup -o "$ACTION" = ifupdate ] || exit 0
enable=`uci -q get network.globals.multipath` || exit 0 enable=`uci -q get network.globals.multipath` || exit 0
[ "$enable" = "enable" ] || exit 0 [ "$enable" = "enable" ] || exit 0
@ -47,17 +45,17 @@ set_default() {
local gateway local gateway
local network local network
local netmask local netmask
network_get_ipaddr ipaddr $config config_get ipaddr $config ipaddr
network_get_gateway gateway $config config_get gateway $config gateway
network_get_subnet network $config network_get_subnet network $config
__network_ifstatus netmask $config "['ipv4-address'][0]['mask']" config_get netmask $config netmask
network=`ipcalc.sh $network | sed -n '/NETWORK=/{;s/.*=//;s/ .*//;p;}'` network=`ipcalc.sh $network | sed -n '/NETWORK=/{;s/.*=//;s/ .*//;p;}'`
ip rule del table $id ip rule del table $id
ip route flush $id ip route flush $id
ip rule add from $ipaddr table $id ip rule add from $ipaddr table $id
ip route add $network/$netmask dev $iface scope link table $id ip route replace $network/$netmask dev $iface scope link table $id
ip route add default via $gateway dev $iface table $id ip route replace default via $gateway dev $iface table $id
ip route flush $id ip route flush $id
[ "$mode" = "master" ] && { [ "$mode" = "master" ] && {

View file

@ -1,11 +1,11 @@
#!/bin/sh /etc/rc.common #!/bin/sh /etc/rc.common
START=10 START=18
USE_PROCD=1 USE_PROCD=1
start_service() { start_service() {
hotplug-call net /sbin/hotplug-call net
} }
reload_service() { reload_service() {

View file

@ -1,6 +1,14 @@
#!/bin/sh #!/bin/sh
uci -q batch <<EOF uci -q batch <<-EOF
set network.globals.mptcp_path_manager='fullmesh' set network.globals.mptcp_path_manager='fullmesh'
set network.globals.mptcp_scheduler='default' set network.globals.mptcp_scheduler='default'
set network.globals.congestion='olia' set network.globals.congestion='olia'
commit network
EOF
uci -q batch <<-EOF
delete ucitrack.@mptcp[-1]
add ucitrack mptcp
set ucitrack.@mptcp[-1].init=mptcp
add_list ucitrack.@network[-1].affects=mptcp
commit ucitrack
EOF EOF