aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp/src/misc
diff options
context:
space:
mode:
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) ->