diff options
author | Ermal <eri@pfsense.org> | 2011-07-01 21:21:07 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2011-07-01 21:21:44 +0000 |
commit | 40fd50c8d044069e144fea38ce5c288f34b6e725 (patch) | |
tree | 236f6a51683c07952b4cdf450f1c71caf9beb9f4 /usr/local/sbin | |
parent | 6fd8fde25d468dfa256a80a8e03e9d47ead16755 (diff) | |
download | pfsense-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-x | usr/local/sbin/ovpn-linkup | 14 |
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" |