mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Remove interface rule restriction
This commit is contained in:
parent
ec183af72c
commit
790ce134b4
1 changed files with 5 additions and 7 deletions
|
@ -10,12 +10,13 @@ USE_PROCD=1
|
||||||
. /lib/functions/network.sh
|
. /lib/functions/network.sh
|
||||||
|
|
||||||
global_multipath_settings() {
|
global_multipath_settings() {
|
||||||
local multipath mptcp_path_manager mptcp_schdeduler congestion mptcp_checksum mptcp_syn_retries mptcp_fullmesh_num_subflows mptcp_fullmesh_create_on_err mptcp_ndiffports_num_subflows
|
local multipath mptcp_path_manager mptcp_schdeduler mptcp_debug congestion mptcp_checksum mptcp_syn_retries mptcp_fullmesh_num_subflows mptcp_fullmesh_create_on_err mptcp_ndiffports_num_subflows
|
||||||
local multipath_status=0
|
local multipath_status=0
|
||||||
config_load network
|
config_load network
|
||||||
config_get multipath globals multipath
|
config_get multipath globals multipath
|
||||||
config_get mptcp_path_manager globals mptcp_path_manager
|
config_get mptcp_path_manager globals mptcp_path_manager
|
||||||
config_get mptcp_scheduler globals mptcp_scheduler
|
config_get mptcp_scheduler globals mptcp_scheduler
|
||||||
|
config_get mptcp_debug globals mptcp_debug
|
||||||
config_get congestion globals congestion
|
config_get congestion globals congestion
|
||||||
config_get mptcp_checksum globals mptcp_checksum
|
config_get mptcp_checksum globals mptcp_checksum
|
||||||
config_get mptcp_syn_retries globals mptcp_syn_retries
|
config_get mptcp_syn_retries globals mptcp_syn_retries
|
||||||
|
@ -31,6 +32,7 @@ global_multipath_settings() {
|
||||||
[ -z "$mptcp_scheduler" ] || sysctl -qw net.mptcp.mptcp_scheduler="$mptcp_scheduler"
|
[ -z "$mptcp_scheduler" ] || sysctl -qw net.mptcp.mptcp_scheduler="$mptcp_scheduler"
|
||||||
[ -z "$congestion" ] || sysctl -qw net.ipv4.tcp_congestion_control="$congestion"
|
[ -z "$congestion" ] || sysctl -qw net.ipv4.tcp_congestion_control="$congestion"
|
||||||
[ -z "$mptcp_checksum" ] || sysctl -qw net.mptcp.mptcp_checksum="$mptcp_checksum"
|
[ -z "$mptcp_checksum" ] || sysctl -qw net.mptcp.mptcp_checksum="$mptcp_checksum"
|
||||||
|
[ -z "$mptcp_debug" ] || sysctl -qw net.mptcp.mptcp_debug="$mptcp_debug"
|
||||||
[ -z "$mptcp_syn_retries" ] || sysctl -qw net.mptcp.mptcp_syn_retries="$mptcp_syn_retries"
|
[ -z "$mptcp_syn_retries" ] || sysctl -qw net.mptcp.mptcp_syn_retries="$mptcp_syn_retries"
|
||||||
[ -z "$mptcp_fullmesh_num_subflows" ] || sysctl -qw /sys/module/mptcp_fullmesh/parameters/num_subflows="$mptcp_fullmesh_num_subflows"
|
[ -z "$mptcp_fullmesh_num_subflows" ] || sysctl -qw /sys/module/mptcp_fullmesh/parameters/num_subflows="$mptcp_fullmesh_num_subflows"
|
||||||
[ -z "$mptcp_fullmesh_create_on_err" ] || sysctl -qw /sys/module/mptcp_fullmesh/parameters/create_on_err="$mptcp_fullmesh_create_on_err"
|
[ -z "$mptcp_fullmesh_create_on_err" ] || sysctl -qw /sys/module/mptcp_fullmesh/parameters/create_on_err="$mptcp_fullmesh_create_on_err"
|
||||||
|
@ -124,8 +126,6 @@ interface_multipath_settings() {
|
||||||
uci -q batch <<-EOF >/dev/null
|
uci -q batch <<-EOF >/dev/null
|
||||||
delete network.${config}_rule
|
delete network.${config}_rule
|
||||||
set network.${config}_rule=rule
|
set network.${config}_rule=rule
|
||||||
set network.${config}_rule.in=${config}
|
|
||||||
set network.${config}_rule.out=${config}
|
|
||||||
set network.${config}_rule.lookup=${id}
|
set network.${config}_rule.lookup=${id}
|
||||||
set network.${config}_rule.priority=0
|
set network.${config}_rule.priority=0
|
||||||
set network.${config}_rule.src="${ipaddr}/32"
|
set network.${config}_rule.src="${ipaddr}/32"
|
||||||
|
@ -144,7 +144,7 @@ interface_multipath_settings() {
|
||||||
set network.${config}_route_default.table=${id}
|
set network.${config}_route_default.table=${id}
|
||||||
commit network
|
commit network
|
||||||
EOF
|
EOF
|
||||||
#ip rule add from $ipaddr iif $iface oif $iface table $id pref 0
|
#ip rule add from $ipaddr table $id pref 0
|
||||||
#ip route replace $network/$netmask dev $iface scope link table $id
|
#ip route replace $network/$netmask dev $iface scope link table $id
|
||||||
#ip route replace 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
|
||||||
|
@ -193,8 +193,6 @@ interface_multipath_settings() {
|
||||||
uci -q batch <<-EOF >/dev/null
|
uci -q batch <<-EOF >/dev/null
|
||||||
delete network.${config}_rule6
|
delete network.${config}_rule6
|
||||||
set network.${config}_rule6=rule6
|
set network.${config}_rule6=rule6
|
||||||
set network.${config}_rule6.in=${config}
|
|
||||||
set network.${config}_rule6.out=${config}
|
|
||||||
set network.${config}_rule6.lookup=6${id}
|
set network.${config}_rule6.lookup=6${id}
|
||||||
set network.${config}_rule6.priority=0
|
set network.${config}_rule6.priority=0
|
||||||
set network.${config}_rule6.src="${ipaddr6}/127"
|
set network.${config}_rule6.src="${ipaddr6}/127"
|
||||||
|
@ -211,7 +209,7 @@ interface_multipath_settings() {
|
||||||
set network.${config}_route6_default.table=6${id}
|
set network.${config}_route6_default.table=6${id}
|
||||||
commit network
|
commit network
|
||||||
EOF
|
EOF
|
||||||
#ip -6 rule add from $ip6addr iif $iface oif $iface table 6$id pref 0
|
#ip -6 rule add from $ip6addr table 6$id pref 0
|
||||||
#ip -6 route replace $network6/$netmask6 dev $iface scope link table 6$id
|
#ip -6 route replace $network6/$netmask6 dev $iface scope link table 6$id
|
||||||
#ip -6 route replace default via $gateway6 dev $iface table 6$id
|
#ip -6 route replace default via $gateway6 dev $iface table 6$id
|
||||||
#ip -6 route flush 6$id
|
#ip -6 route flush 6$id
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue