aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp/src/misc
diff options
context:
space:
mode:
authorRaimo Niskanen <[email protected]>2014-05-28 16:26:34 +0200
committerRaimo Niskanen <[email protected]>2014-07-25 12:17:49 +0200
commit4dba07b435696393adbf582933f9b539be48b943 (patch)
tree1d20e6bc8a0e47635b9ff5f219dc31ce030a15e5 /lib/snmp/src/misc
parent20bb61e48a8370a4b5913d7d8e16a260bd3e31eb (diff)
downloadotp-4dba07b435696393adbf582933f9b539be48b943.tar.gz
otp-4dba07b435696393adbf582933f9b539be48b943.tar.bz2
otp-4dba07b435696393adbf582933f9b539be48b943.zip
Use IPv6 config in manager
Diffstat (limited to 'lib/snmp/src/misc')
-rw-r--r--lib/snmp/src/misc/snmp_conf.erl2
-rw-r--r--lib/snmp/src/misc/snmp_config.erl17
2 files changed, 15 insertions, 4 deletions
diff --git a/lib/snmp/src/misc/snmp_conf.erl b/lib/snmp/src/misc/snmp_conf.erl
index ea4686c91a..82cbf42e35 100644
--- a/lib/snmp/src/misc/snmp_conf.erl
+++ b/lib/snmp/src/misc/snmp_conf.erl
@@ -508,6 +508,8 @@ tdomain_to_family(transportDomainUdpIpv4) ->
inet;
tdomain_to_family(transportDomainUdpIpv6) ->
inet6;
+tdomain_to_family(?snmpUDPDomain) ->
+ inet;
tdomain_to_family(?transportDomainUdpIpv4) ->
inet;
tdomain_to_family(?transportDomainUdpIpv6) ->
diff --git a/lib/snmp/src/misc/snmp_config.erl b/lib/snmp/src/misc/snmp_config.erl
index 68d4aee97d..38e248c326 100644
--- a/lib/snmp/src/misc/snmp_config.erl
+++ b/lib/snmp/src/misc/snmp_config.erl
@@ -2107,10 +2107,19 @@ write_manager_snmp_conf(Dir, IP, Port, MMS, EngineID) ->
"%% {max_message_size, 484}.\n"
"%%\n\n",
Hdr = header() ++ Comment,
- Conf = [{port, Port},
- {address, IP},
- {engine_id, EngineID},
- {max_message_size, MMS}],
+ Conf =
+ case Port of
+ {Addr, P} when is_integer(P), is_atom(IP) ->
+ Domain = IP,
+ [{domain, Domain},
+ {port, P},
+ {address, Addr}];
+ _ when is_integer(Port) ->
+ [{port, Port},
+ {address, IP}]
+ end ++
+ [{engine_id, EngineID},
+ {max_message_size, MMS}],
write_manager_config(Dir, Hdr, Conf).
write_manager_config(Dir, Hdr, Conf) ->