summaryrefslogtreecommitdiff
path: root/src/system
diff options
context:
space:
mode:
Diffstat (limited to 'src/system')
-rwxr-xr-xsrc/system/kea-vrf-helper14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/system/kea-vrf-helper b/src/system/kea-vrf-helper
new file mode 100755
index 000000000..b4dd6a349
--- /dev/null
+++ b/src/system/kea-vrf-helper
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+VRF=$1
+shift
+
+export KEA_DHCP_DATA_DIR=/config/dhcp
+export KEA_HOOK_SCRIPTS_PATH=/usr/libexec/vyos/system
+export KEA_LOCKFILE_DIR=/run/lock/kea
+
+ip vrf exec $VRF \
+ setpriv --reuid=_kea --regid=_kea --init-groups \
+ --inh-caps +net_bind_service,+net_raw \
+ --ambient-caps +net_bind_service,+net_raw \
+ $@