diff options
author | Viacheslav <v.gletenko@vyos.io> | 2021-12-06 15:09:36 +0000 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-12-06 18:45:16 +0100 |
commit | 957e215b1706218450ca05d740c1a810275b1cb2 (patch) | |
tree | 385c46ec0b527e502bba815ac3872682a7a61c89 | |
parent | 80fc0319b2cd2b5977e6691991c25051d1d08de5 (diff) | |
download | vyos-1x-957e215b1706218450ca05d740c1a810275b1cb2.tar.gz vyos-1x-957e215b1706218450ca05d740c1a810275b1cb2.zip |
sflow: T4046: Add source-address for sflow
(cherry picked from commit bb77dd269bfb9522f5b56ac027598ac20e101f13)
-rw-r--r-- | data/templates/netflow/uacctd.conf.tmpl | 3 | ||||
-rw-r--r-- | interface-definitions/flow-accounting-conf.xml.in | 1 | ||||
-rwxr-xr-x | src/conf_mode/flow_accounting_conf.py | 3 |
3 files changed, 6 insertions, 1 deletions
diff --git a/data/templates/netflow/uacctd.conf.tmpl b/data/templates/netflow/uacctd.conf.tmpl index 1c183bb20..11fc76769 100644 --- a/data/templates/netflow/uacctd.conf.tmpl +++ b/data/templates/netflow/uacctd.conf.tmpl @@ -68,5 +68,8 @@ sfprobe_agentip[sf_{{ server['address'] }}]: {{ templatecfg['sflow']['agent-addr {% if templatecfg['sflow']['sampling-rate'] != none %} sampling_rate[sf_{{ server['address'] }}]: {{ templatecfg['sflow']['sampling-rate'] }} {% endif %} +{% if templatecfg['sflow']['source-address'] != none %} +sfprobe_source_ip[sf_{{ server['address'] }}]: {{ templatecfg['sflow']['source-address'] }} +{% endif %} {% endfor %} {% endif %} diff --git a/interface-definitions/flow-accounting-conf.xml.in b/interface-definitions/flow-accounting-conf.xml.in index b0f308afd..6e87a2289 100644 --- a/interface-definitions/flow-accounting-conf.xml.in +++ b/interface-definitions/flow-accounting-conf.xml.in @@ -428,6 +428,7 @@ </leafNode> </children> </tagNode> + #include <include/source-address-ipv4-ipv6.xml.i> </children> </node> </children> diff --git a/src/conf_mode/flow_accounting_conf.py b/src/conf_mode/flow_accounting_conf.py index 0a4559ade..daad00067 100755 --- a/src/conf_mode/flow_accounting_conf.py +++ b/src/conf_mode/flow_accounting_conf.py @@ -169,7 +169,8 @@ def get_config(): 'configured': vc.exists('system flow-accounting sflow'), 'agent-address': vc.return_value('system flow-accounting sflow agent-address'), 'sampling-rate': vc.return_value('system flow-accounting sflow sampling-rate'), - 'servers': None + 'servers': None, + 'source-address': vc.return_value('system flow-accounting sflow source-address') }, 'netflow': { 'configured': vc.exists('system flow-accounting netflow'), |