Skip to content

Commit b0147d2

Browse files
Revert "[SNMP][IPv6]: Fix to use link local IPv6 address as snmp agentAddress (sonic-net#16013) (sonic-net#16102)"
This reverts commit 628e1ad.
1 parent 4ee9565 commit b0147d2

File tree

1 file changed

+5
-16
lines changed

1 file changed

+5
-16
lines changed

dockers/docker-snmp/snmpd.conf.j2

+5-16
Original file line numberDiff line numberDiff line change
@@ -30,27 +30,16 @@ agentAddress {{ protocol(agentip) }}:[{{ agentip }}]{% if port %}:{{ port }}{% e
3030
{% endfor %}
3131
{% elif NAMESPACE_COUNT is not defined or NAMESPACE_COUNT|int <= 1 %}
3232
{% if MGMT_INTERFACE is defined %}
33-
{% for intf, ip in MGMT_INTERFACE %}
34-
{% set agentip = ip.split('/')[0]|lower %}
35-
{% set zoneid = '' %}
36-
# Use interface as zoneid for link local ipv6
37-
{% if agentip.startswith('fe80') %}
38-
{% set zoneid = '%' + intf %}
39-
{% endif %}
40-
agentAddress {{ protocol(agentip) }}:[{{ agentip }}{{ zoneid }}]:161
33+
{% for if, ip in MGMT_INTERFACE %}
34+
{% set agentip = ip.split('/')[0] %}
35+
agentAddress {{ protocol(agentip) }}:[{{ agentip }}]:161
4136
{% endfor %}
4237
{% endif %}
4338
{% if LOOPBACK_INTERFACE is defined %}
4439
{% for lo in LOOPBACK_INTERFACE %}
4540
{% if lo | length == 2 %}
46-
{% set intf = lo[0] %}
47-
{% set agentip = lo[1].split('/')[0]|lower %}
48-
{% set zoneid = '' %}
49-
# Use interface as zoneid for link local ipv6
50-
{% if agentip.startswith('fe80') %}
51-
{% set zoneid = '%' + intf %}
52-
{% endif %}
53-
agentAddress {{ protocol(agentip) }}:[{{ agentip }}{{ zoneid }}]:161
41+
{% set agentip = lo[1].split('/')[0] %}
42+
agentAddress {{ protocol(agentip) }}:[{{ agentip }}]:161
5443
{% endif %}
5544
{% endfor %}
5645
{% endif %}

0 commit comments

Comments
 (0)