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

Fix for gre tunnel

This commit is contained in:
Ycarus (Yannick Chabanois) 2020-12-11 21:38:50 +01:00
parent 8f2b608c2c
commit 0f87c62f36

View file

@ -439,7 +439,7 @@ _get_gre_tunnel() {
peeraddr="$(echo $tunnel | jsonfilter -q -e '@.remote_ip')"
ipaddr="$(echo $tunnel | jsonfilter -q -e '@.local_ip')"
publicaddr="$(echo $tunnel | jsonfilter -q -e '@.public_ip')"
if [ "$peeraddr" != "" ] && [ "$ipaddr" != "" ] && [ "$publicaddr" != "" ] && ([ "$(uci -q get network.omrip${i}.peeraddr)" != "$peeraddr" ] || [ "$(uci -q get network.omrip${i}.ipaddr)" != "$ipaddr" ] || [ "$(uci -q get network.omrip${i}gre.ipaddr)" != "$vpnip_local" ]); then
if [ "$peeraddr" != "" ] && [ "$ipaddr" != "" ] && [ "$publicaddr" != "" ] && ([ "$(uci -q get network.omrip${i}.ipaddr)" != "$peeraddr" ] || [ "$(uci -q get network.omrip${i}.ipaddr)" != "$ipaddr" ] || [ "$(uci -q get network.omrip${i}gre.ipaddr)" != "$vpnip_local" ]); then
uci -q batch <<-EOF >/dev/null
set network.omrip${i}gre=interface
set network.omrip${i}gre.label="GRE tunnel for $publicaddr"