aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp/src/agent
diff options
context:
space:
mode:
Diffstat (limited to 'lib/snmp/src/agent')
-rw-r--r--lib/snmp/src/agent/snmpa_net_if.erl11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/snmp/src/agent/snmpa_net_if.erl b/lib/snmp/src/agent/snmpa_net_if.erl
index 8f6706166b..389c26834d 100644
--- a/lib/snmp/src/agent/snmpa_net_if.erl
+++ b/lib/snmp/src/agent/snmpa_net_if.erl
@@ -1448,9 +1448,14 @@ get_counters([Counter|Counters], Acc) ->
socket_opts(Domain, {IpAddr, IpPort}, Opts) ->
[IpPort, % Picked off at socket open, separate argument
- binary,
- snmp_conf:tdomain_to_family(Domain)
- | case get_bind_to_ip_address(Opts) of
+ binary
+ | case snmp_conf:tdomain_to_family(Domain) of
+ inet6 = Family ->
+ [Family, {ipv6_v6only, true}];
+ Family ->
+ [Family]
+ end ++
+ case get_bind_to_ip_address(Opts) of
true ->
[{ip, IpAddr}];
_ ->