summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-01-22 09:25:11 +0100
committerGitHub <noreply@github.com>2024-01-22 09:25:11 +0100
commit7f7cf25cdd84da7c2b99c0913e5ba25d999b3978 (patch)
tree1c8b37f68d5b761dfedd2106d3ed38132856a50c /data
parent39d0464616be1fc12be201223a84937b43c19382 (diff)
parentd8a151eafbc7f87bd82f19439e37e8c87ca48d6f (diff)
downloadvyos-1x-7f7cf25cdd84da7c2b99c0913e5ba25d999b3978.tar.gz
vyos-1x-7f7cf25cdd84da7c2b99c0913e5ba25d999b3978.zip
Merge pull request #2870 from vyos/mergify/bp/sagitta/pr-2869
sflow: T5968: add VRF support (backport #2869)
Diffstat (limited to 'data')
-rw-r--r--data/templates/sflow/override.conf.j23
1 files changed, 2 insertions, 1 deletions
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=