Skip to content

Commit

Permalink
Fix find netmask via mptcp
Browse files Browse the repository at this point in the history
  • Loading branch information
Ysurac committed Jan 24, 2024
1 parent c5bacfc commit aad8e63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mptcp/files/etc/init.d/mptcp
Original file line number Diff line number Diff line change
Expand Up @@ -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;}'`
Expand Down

0 comments on commit aad8e63

Please sign in to comment.