summaryrefslogtreecommitdiffstats
path: root/usr/local/sbin
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2014-02-20 08:21:23 -0300
committerRenato Botelho <garga@FreeBSD.org>2014-02-20 08:26:03 -0300
commit070dad6c8d4f4e02ad9f6f87169b7adc1ebeee34 (patch)
tree53b22eead74e7a16e731e28fef2bedfb8fba879f /usr/local/sbin
parent26ea40b7f1b0718415247c47077ee8e665888819 (diff)
downloadpfsense-070dad6c8d4f4e02ad9f6f87169b7adc1ebeee34.zip
pfsense-070dad6c8d4f4e02ad9f6f87169b7adc1ebeee34.tar.gz
Use env var provided by openvpn to determine if it's tun or tap, it should fix #3475
Diffstat (limited to 'usr/local/sbin')
-rwxr-xr-xusr/local/sbin/ovpn-linkup4
1 files changed, 1 insertions, 3 deletions
diff --git a/usr/local/sbin/ovpn-linkup b/usr/local/sbin/ovpn-linkup
index 3ebf32e..2f3246e 100755
--- a/usr/local/sbin/ovpn-linkup
+++ b/usr/local/sbin/ovpn-linkup
@@ -3,9 +3,7 @@
# let the configuration system know that the ip has changed.
#/usr/local/sbin/pfSctl -c "interface newip $interface"
-
-ifindex="${1##?????}"
-if [ -e /dev/tun$ifindex ]; then
+if [ "${dev_type}" = "tun" ]; then
if [ "" != "$route_vpn_gateway" ]; then
/bin/echo $route_vpn_gateway > /tmp/$1_router
else
OpenPOWER on IntegriCloud