+ local vpn_ip
+
+ # Handle %defaultroute
+ if [ "${VPN_IP}" = "%defaultroute" ]; then
+ if [ -r "/var/ipfire/red/local-ipaddress" ]; then
+ vpn_ip="$(</var/ipfire/red/local-ipaddress)"
+
+ elif [ "${RED_TYPE}" = "STATIC" -a -n "${RED_ADDRESS}" ]; then
+ vpn_ip="${RED_ADDRESS}"
+
+ fi
+ else
+ vpn_ip="${VPM_IP}"
+ fi