1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Fix mptcp for DHCP

This commit is contained in:
Ycarus 2018-03-03 20:50:45 +01:00
parent bce8de47d7
commit 0aa73216f3

View file

@ -56,7 +56,7 @@ interface_multipath_settings() {
network=`ipcalc.sh $ipaddr $netmask | sed -n '/NETWORK=/{;s/.*=//;s/ .*//;p;}'` network=`ipcalc.sh $ipaddr $netmask | sed -n '/NETWORK=/{;s/.*=//;s/ .*//;p;}'`
else else
network_get_ipaddr $config ipaddr network_get_ipaddr $config ipaddr
ipaddr= $(ip -4 addr show dev $iface | grep inet | awk '{print $2}' | cut -d/ -f1 | tr -d "\n") ipaddr=$(ip -4 addr show dev $iface | grep inet | awk '{print $2}' | cut -d/ -f1 | tr -d "\n")
gateway=$(ip -4 r list dev $iface | grep -v default | awk '/proto static/ {print $1}' | tr -d "\n") gateway=$(ip -4 r list dev $iface | grep -v default | awk '/proto static/ {print $1}' | tr -d "\n")
[ -z "$gateway" ] && gateway=$(ubus call network.interface.$iface status | jsonfilter -e '@.route[0].nexthop' | tr -d "\n") [ -z "$gateway" ] && gateway=$(ubus call network.interface.$iface status | jsonfilter -e '@.route[0].nexthop' | tr -d "\n")
netmask=$(ip -4 addr show dev $iface | grep inet | awk '{print $2}' | cut -d/ -f2 | tr -d "\n") netmask=$(ip -4 addr show dev $iface | grep inet | awk '{print $2}' | cut -d/ -f2 | tr -d "\n")