diff --git a/mptcp/files/etc/init.d/mptcp b/mptcp/files/etc/init.d/mptcp index a249d6a91..266ec85b6 100755 --- a/mptcp/files/etc/init.d/mptcp +++ b/mptcp/files/etc/init.d/mptcp @@ -58,8 +58,8 @@ interface_multipath_settings() { network_get_ipaddr $config ipaddr 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") - [ -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 '@.inactive.route[0].nexthop' | tr -d "\n") + [ -z "$gateway" ] && gateway=$(ubus call network.interface.$config status | jsonfilter -e '@.route[0].nexthop' | tr -d "\n") + [ -z "$gateway" ] && gateway=$(ubus call network.interface.$config status | jsonfilter -e '@.inactive.route[0].nexthop' | tr -d "\n") netmask=$(ip -4 addr show dev $iface | grep inet | awk '{print $2}' | cut -d/ -f2 | tr -d "\n") network=`ipcalc.sh $ipaddr $netmask | sed -n '/NETWORK=/{;s/.*=//;s/ .*//;p;}'` fi diff --git a/omr-tracker/files/bin/omr-tracker b/omr-tracker/files/bin/omr-tracker index bd9fc72d9..7a36bc42a 100755 --- a/omr-tracker/files/bin/omr-tracker +++ b/omr-tracker/files/bin/omr-tracker @@ -129,10 +129,10 @@ while true; do OMR_TRACKER_DEVICE_GATEWAY=$(ip -4 r list dev "$OMR_TRACKER_DEVICE" | grep -v default | awk '/proto static/ {print $1}' | tr -d "\n") fi if [ -z "$OMR_TRACKER_DEVICE_GATEWAY" ]; then - OMR_TRACKER_DEVICE_GATEWAY=$(ubus call network.interface.$OMR_TRACKER_DEVICE status | jsonfilter -e '@.route[0].nexthop' | tr -d "\n") + OMR_TRACKER_DEVICE_GATEWAY=$(ubus call network.interface.$OMR_TRACKER_INTERFACE status | jsonfilter -e '@.route[0].nexthop' | tr -d "\n") fi if [ -z "$OMR_TRACKER_DEVICE_GATEWAY" ]; then - OMR_TRACKER_DEVICE_GATEWAY=$(ubus call network.interface.$OMR_TRACKER_DEVICE status | jsonfilter -e '@.inactive.route[0].nexthop' | tr -d "\n") + OMR_TRACKER_DEVICE_GATEWAY=$(ubus call network.interface.$OMR_TRACKER_INTERFACE status | jsonfilter -e '@.inactive.route[0].nexthop' | tr -d "\n") fi # execute specific tracker