mirror of
https://github.com/Ysurac/openmptcprouter-vps.git
synced 2025-03-09 15:50:00 +00:00
Fix gre-tunnels creation when multiple users
This commit is contained in:
parent
8fb17cef85
commit
d87b58da11
1 changed files with 2 additions and 2 deletions
|
@ -56,9 +56,9 @@ _gre_tunnels() {
|
||||||
if [ -f "$intf" ]; then
|
if [ -f "$intf" ]; then
|
||||||
. "$(readlink -f "$intf")"
|
. "$(readlink -f "$intf")"
|
||||||
iface="$(basename $intf)"
|
iface="$(basename $intf)"
|
||||||
if [ "$(ip tunnel show $iface 2>/dev/null | awk '{print $4}')" != "$OMR_ADDR" ]; then
|
if [ "$(ip tunnel show $iface 2>/dev/null | awk '{print $4}')" != "$REMOTEIP" ]; then
|
||||||
ip tunnel del $iface 2>&1 >/dev/null
|
ip tunnel del $iface 2>&1 >/dev/null
|
||||||
ip tunnel add $iface mode gre local $INTFADDR remote $OMR_ADDR
|
ip tunnel add $iface mode gre local $INTFADDR remote $REMOTEIP
|
||||||
ip link set $iface up
|
ip link set $iface up
|
||||||
ip addr add $LOCALIP dev $iface
|
ip addr add $LOCALIP dev $iface
|
||||||
ip route add $NETWORK dev $iface 2>&1 >/dev/null
|
ip route add $NETWORK dev $iface 2>&1 >/dev/null
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue