summaryrefslogtreecommitdiffstats
path: root/usr/local/sbin
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2011-07-01 21:21:07 +0000
committerErmal <eri@pfsense.org>2011-07-01 21:21:44 +0000
commit40fd50c8d044069e144fea38ce5c288f34b6e725 (patch)
tree236f6a51683c07952b4cdf450f1c71caf9beb9f4 /usr/local/sbin
parent6fd8fde25d468dfa256a80a8e03e9d47ead16755 (diff)
downloadpfsense-40fd50c8d044069e144fea38ce5c288f34b6e725.zip
pfsense-40fd50c8d044069e144fea38ce5c288f34b6e725.tar.gz
Do not add an automatic gateway on openvpn tap case since its only the netmask.
Diffstat (limited to 'usr/local/sbin')
-rwxr-xr-xusr/local/sbin/ovpn-linkup14
1 files changed, 10 insertions, 4 deletions
diff --git a/usr/local/sbin/ovpn-linkup b/usr/local/sbin/ovpn-linkup
index b613a9a..0f1ca80 100755
--- a/usr/local/sbin/ovpn-linkup
+++ b/usr/local/sbin/ovpn-linkup
@@ -2,11 +2,17 @@
# let the configuration system know that the ip has changed.
#/usr/local/sbin/pfSctl -c "interface newip $interface"
-if [ "" != "$route_vpn_gateway" ]; then
- /bin/echo $route_vpn_gateway > /tmp/$1_router
-else
- /bin/echo $5 > /tmp/$1_router
+
+
+ifindex="${1##?????}"
+if [ -f /dev/tun$ifindex ]; then
+ if [ "" != "$route_vpn_gateway" ]; then
+ /bin/echo $route_vpn_gateway > /tmp/$1_router
+ else
+ /bin/echo $5 > /tmp/$1_router
+ fi
fi
+
/usr/bin/touch /tmp/$1up
# reload filter
/usr/local/sbin/pfSctl -c "interface newip $1"
OpenPOWER on IntegriCloud