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:21:23 -0300
commit08185f4aa2282077e2e1f15baad5593352123d68 (patch)
tree35f30aac3d64ee345dc711af051fdf3328d078d9 /usr/local/sbin
parent315bdf65a12337f150bde11d95824528d90068be (diff)
downloadpfsense-08185f4aa2282077e2e1f15baad5593352123d68.zip
pfsense-08185f4aa2282077e2e1f15baad5593352123d68.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