Skip to content

Commit

Permalink
Fix IPv6 in route configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Ysurac committed Jan 22, 2024
1 parent ec6fd52 commit ee12f0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mptcp/files/etc/init.d/mptcp
Original file line number Diff line number Diff line change
Expand Up @@ -344,8 +344,8 @@ interface_multipath_settings() {
# gateway6=$(ubus call network.interface.${config}_6 status 2>/dev/null | jsonfilter -q -l 1 -e '@.inactive.route[@.target="::"].nexthop' | tr -d "\n")
#fi
gateway6=$(echo $gateway6 | cut -d/ -f1 | tr -d "\n")
netmask6=$(ip -6 addr show dev $iface | sort -r | grep -m 1 inet6 | awk '{print $2}' | cut -d/ -f2 | tr -d "\n")
[ -n "$ip6addr" ] && network6=`ipcalc -n $ip6addr | sed -n '/NETWORK=/{;s/.*=//;s/ .*//;p;}'`
[ -n "$ip6addr" ] && netmask6=$(ip -6 addr show dev $iface | grep $ip6addr | grep -m 1 inet6 | awk '{print $2}' | cut -d/ -f2 | tr -d "\n")
[ -n "$ip6addr" ] && [ -n "$netmask6" ] && network6=`/usr/sbin/ipcalc -n ${ip6addr}/${netmask6} | sed -n '/NETWORK=/{;s/.*=//;s/ .*//;p;}'`
fi
if [ "$(uci -q get openmptcprouter.settings.uci_route)" = "1" ]; then
uci -q batch <<-EOF >/dev/null
Expand Down

0 comments on commit ee12f0f

Please sign in to comment.