mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Fix find netmask via mptcp
This commit is contained in:
parent
c5bacfc244
commit
aad8e632f1
1 changed files with 1 additions and 1 deletions
|
@ -250,7 +250,7 @@ interface_multipath_settings() {
|
|||
network_get_subnet netmask $config
|
||||
[ -n "$netmask" ] && [ "$(echo $netmask | grep '/')" != "" ] && netmask=""
|
||||
[ -z "$netmask" ] && netmask=$(ip -4 addr show dev $iface | grep peer | awk '{print $4}' | cut -d/ -f2 | tr -d "\n")
|
||||
[ -z "$netmask" ] && netmask=$(ip -4 addr show dev $iface | grep inet | awk '{print $2}' | cut -d/ -f2 | tr -d "\n")
|
||||
[ -z "$netmask" ] && netmask=$(ip -4 addr show dev $iface | grep 'inet ' | awk '{print $2}' | cut -d/ -f2 | tr -d "\n")
|
||||
[ -n "$ipaddr" ] && ipaddr=$(echo $ipaddr | cut -d/ -f1 | tr -d "\n")
|
||||
[ -n "$ipaddr" ] && [ -n "$netmask" ] && netmask=`ipcalc.sh $ipaddr/$netmask | sed -n '/PREFIX=/{;s/.*=//;s/ .*//;p;}'`
|
||||
[ -n "$ipaddr" ] && [ -n "$netmask" ] && network=`ipcalc.sh $ipaddr/$netmask | sed -n '/NETWORK=/{;s/.*=//;s/ .*//;p;}'`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue