openvpn: Add more hotplug events
OpenVPN supports more hooks than just 'up' and 'down'. Especially reacting to 'route-up' and 'route-pre-down' events could be important. When routing table changes, it can make sense to adapt firewall, run some tests or change even more routes. This change passes those events to hotplug, so it is easy to react to them without changing configuration files provided by VPN provider. Signed-off-by: Michal Hrusecky <michal.hrusecky@turris.com>
This commit is contained in:
parent
7cc8d25381
commit
f8a8b71e26
2 changed files with 4 additions and 1 deletions
|
@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
|
|||
PKG_NAME:=openvpn
|
||||
|
||||
PKG_VERSION:=2.5.8
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE_URL:=\
|
||||
https://build.openvpn.net/downloads/releases/ \
|
||||
|
|
|
@ -153,6 +153,9 @@ openvpn_add_instance() {
|
|||
--config "$conf" \
|
||||
--up "/usr/libexec/openvpn-hotplug up $name" \
|
||||
--down "/usr/libexec/openvpn-hotplug down $name" \
|
||||
--route-up "/usr/libexec/openvpn-hotplug route-up $name" \
|
||||
--route-pre-down "/usr/libexec/openvpn-hotplug route-pre-down $name" \
|
||||
--ipchange "/usr/libexec/openvpn-hotplug ipchange $name" \
|
||||
${up:+--setenv user_up "$up"} \
|
||||
${down:+--setenv user_down "$down"} \
|
||||
--script-security "${security:-2}" \
|
||||
|
|
Loading…
Reference in a new issue