From 64473fa6f320375fb3d3de4de9e729f456ee5ae2 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Mon, 22 Jan 2024 08:12:21 +0100 Subject: sflow: T5968: add VRF support Add support to run hsflowd in a dedicated (e.g. management) VRF. Command will be "set system sflow vrf " like with any other service --- data/templates/sflow/override.conf.j2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'data/templates') diff --git a/data/templates/sflow/override.conf.j2 b/data/templates/sflow/override.conf.j2 index f2a982528..73588fdb2 100644 --- a/data/templates/sflow/override.conf.j2 +++ b/data/templates/sflow/override.conf.j2 @@ -1,3 +1,4 @@ +{% set vrf_command = 'ip vrf exec ' ~ vrf ~ ' ' if vrf is vyos_defined else '' %} [Unit] After= After=vyos-router.service @@ -7,7 +8,7 @@ ConditionPathExists=/run/sflow/hsflowd.conf [Service] EnvironmentFile= ExecStart= -ExecStart=/usr/sbin/hsflowd -m %m -d -f /run/sflow/hsflowd.conf +ExecStart={{ vrf_command }}/usr/sbin/hsflowd -m %m -d -f /run/sflow/hsflowd.conf WorkingDirectory= WorkingDirectory=/run/sflow PIDFile= -- cgit v1.2.3