aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp/src/misc/snmp_config.erl
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/snmp_config.erl
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/snmp_config.erl')
-rw-r--r--lib/snmp/src/misc/snmp_config.erl17
1 files changed, 13 insertions, 4 deletions
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) ->