mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-14 19:41:51 +00:00
Fix force an interface to be master when not set
This commit is contained in:
parent
ad907829de
commit
3236f88713
1 changed files with 3 additions and 1 deletions
|
@ -116,6 +116,7 @@ interface_multipath_settings() {
|
|||
[ "$mode" != "off" ] && {
|
||||
[ -n "$mptcpintf" ] && mptcpintf="$mptcpintf $iface"
|
||||
[ -z "$mptcpintf" ] && mptcpintf="$iface"
|
||||
[ -z "$mptcpmintf" ] && mptcpmintf="$config"
|
||||
uci -q set network.${config}.defaultroute=0
|
||||
uci -q set network.${config}.peerdns=0
|
||||
}
|
||||
|
@ -435,6 +436,7 @@ start_service() {
|
|||
}
|
||||
|
||||
mptcpintf=""
|
||||
mptcpmintf=""
|
||||
master=""
|
||||
count="0"
|
||||
config_load openmptcprouter
|
||||
|
@ -459,7 +461,7 @@ start_service() {
|
|||
config_foreach add_route route6
|
||||
# If no master is defined, one interface is defined as master
|
||||
if [ "$master" = "" ] && [ "$intf" = "" ]; then
|
||||
intfmaster="$(echo $mptcpintf | cut -d' ' -f1 | tr -d '\n')"
|
||||
intfmaster="$mptcpmintf"
|
||||
[ "$intfmaster" != "" ] && {
|
||||
logger -t "MPTCP" "No master multipath defined, setting it to $intfmaster"
|
||||
uci -q set network.${intfmaster}.multipath="master"
|
||||
|
|
Loading…
Reference in a new issue