mirror of https://github.com/aredn/aredn.git
BUGFIX: tunnel firewall to behave same as dtdlink part 2
This commit is contained in:
parent
15f8792001
commit
f610c58b82
|
@ -106,17 +106,22 @@ fi
|
||||||
|
|
||||||
if [ "$action" = "up" ] ; then
|
if [ "$action" = "up" ] ; then
|
||||||
# Adding route policies for tunnel interface
|
# Adding route policies for tunnel interface
|
||||||
|
# identical to hotplug for dtdlink
|
||||||
if ( ! `ip rule list | egrep "^20020:.*$interface.*30" > /dev/null`) then
|
if ( ! `ip rule list | egrep "^20020:.*$interface.*30" > /dev/null`) then
|
||||||
if [ -e /etc/config/dmz-mode ] ; then
|
if [ -e /etc/config/dmz-mode ] ; then
|
||||||
ip rule add pref 20010 iif $interface lookup 29 # local interfaces
|
ip rule add pref 20010 iif $interface lookup 29 # local interfaces
|
||||||
fi
|
fi
|
||||||
ip rule add pref 20020 iif $interface lookup 30 # mesh
|
ip rule add pref 20020 iif $interface lookup 30 # mesh
|
||||||
|
ip rule add pref 20080 iif $interface lookup 31 # gateway
|
||||||
|
ip rule add pref 20090 iif $interface lookup main
|
||||||
ip rule add pref 20099 iif $interface unreachable
|
ip rule add pref 20099 iif $interface unreachable
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
# Remove route policies for tunnel interface
|
# Remove route policies for tunnel interface
|
||||||
ip rule del pref 20010 iif $interface lookup 29
|
ip rule del pref 20010 iif $interface lookup 29
|
||||||
ip rule del pref 20020 iif $interface lookup 30
|
ip rule del pref 20020 iif $interface lookup 30
|
||||||
|
ip rule del pref 20080 iff $interface lookup 31
|
||||||
|
ip rule del pref 20090 iff $interface lookup main
|
||||||
ip rule del pref 20099 iif $interface unreachable
|
ip rule del pref 20099 iif $interface unreachable
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue