summaryrefslogtreecommitdiffstats
path: root/src/usr/local/sbin/ovpn-linkup
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2016-12-02 14:41:30 -0500
committerjim-p <jimp@pfsense.org>2016-12-02 14:41:30 -0500
commitf829a8d3258e377b778ac84a1f2f345b8a79b766 (patch)
treeec384e7f0be03938e07e1d53043771f05c87b863 /src/usr/local/sbin/ovpn-linkup
parent8ec7704086b79801fc4c58acc2d3de3d09bd6f05 (diff)
downloadpfsense-f829a8d3258e377b778ac84a1f2f345b8a79b766.zip
pfsense-f829a8d3258e377b778ac84a1f2f345b8a79b766.tar.gz
OpenVPN populates IPv6 env vars now, so we can fetch them for the IPv6 gateway. Fixes #6016
Diffstat (limited to 'src/usr/local/sbin/ovpn-linkup')
-rwxr-xr-xsrc/usr/local/sbin/ovpn-linkup13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/usr/local/sbin/ovpn-linkup b/src/usr/local/sbin/ovpn-linkup
index ec0a240..0551974 100755
--- a/src/usr/local/sbin/ovpn-linkup
+++ b/src/usr/local/sbin/ovpn-linkup
@@ -28,10 +28,23 @@ if [ "${dev_type}" = "tun" ]; then
else
/bin/echo ${5} > /tmp/${1}_router
fi
+
+ if [ -n "${route_ipv6_gateway_1}" ]; then
+ /bin/echo ${route_ipv6_gateway_1} > /tmp/${1}_routerv6
+ elif [ -n "${ifconfig_ipv6_remote}" ]; then
+ /bin/echo ${ifconfig_ipv6_remote} > /tmp/${1}_routerv6
+ elif [ -n "${ifconfig_ipv6_local}" ]; then
+ /bin/echo ${ifconfig_ipv6_local} > /tmp/${1}_routerv6
+ fi
+
else
if [ -n "${route_vpn_gateway}" ]; then
/bin/echo ${route_vpn_gateway} > /tmp/${1}_router
fi
+
+ if [ -n "${route_ipv6_gateway_1}" ]; then
+ /bin/echo ${route_ipv6_gateway_1} > /tmp/${1}_routerv6
+ fi
fi
/usr/bin/touch /tmp/${1}up
OpenPOWER on IntegriCloud