summaryrefslogtreecommitdiff
path: root/data/templates/sflow/override.conf.j2
diff options
context:
space:
mode:
authorViacheslav Hletenko <v.gletenko@vyos.io>2024-01-22 09:32:06 +0200
committerGitHub <noreply@github.com>2024-01-22 09:32:06 +0200
commit34419458d99cf8d07279f92935c0f10d9b603f33 (patch)
tree7db6b73ba03087473534097995f512b555a3dd4e /data/templates/sflow/override.conf.j2
parent56dabbfddc6f7d15e27b5293bcf1ed2deb031c38 (diff)
parent64473fa6f320375fb3d3de4de9e729f456ee5ae2 (diff)
downloadvyos-1x-34419458d99cf8d07279f92935c0f10d9b603f33.tar.gz
vyos-1x-34419458d99cf8d07279f92935c0f10d9b603f33.zip
Merge pull request #2869 from c-po/sflow-t5968
sflow: T5968: add VRF support
Diffstat (limited to 'data/templates/sflow/override.conf.j2')
-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=