aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp/src/misc/snmp_conf.erl
diff options
context:
space:
mode:
authorRaimo Niskanen <[email protected]>2014-05-20 15:15:43 +0200
committerRaimo Niskanen <[email protected]>2014-07-25 12:15:16 +0200
commitcc1ab998ce905cd673c7ea14ee4e31ddb2412350 (patch)
treeee74e4790f89a8282d077458ee9d1af472d8a914 /lib/snmp/src/misc/snmp_conf.erl
parentc1104d6708917d7ec0b3b77340242b679ee10122 (diff)
downloadotp-cc1ab998ce905cd673c7ea14ee4e31ddb2412350.tar.gz
otp-cc1ab998ce905cd673c7ea14ee4e31ddb2412350.tar.bz2
otp-cc1ab998ce905cd673c7ea14ee4e31ddb2412350.zip
Don't encode IPv6 address into v1 trap and fix legacy arguments to snmpa_network_interface_filter functions
Diffstat (limited to 'lib/snmp/src/misc/snmp_conf.erl')
-rw-r--r--lib/snmp/src/misc/snmp_conf.erl13
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/snmp/src/misc/snmp_conf.erl b/lib/snmp/src/misc/snmp_conf.erl
index 594cfce705..2d91cb1f55 100644
--- a/lib/snmp/src/misc/snmp_conf.erl
+++ b/lib/snmp/src/misc/snmp_conf.erl
@@ -634,9 +634,16 @@ mk_taddress(transportDomainUdpIpv6 = Domain, Address) ->
case Address of
[] -> % Empty mask
[];
- {Ip, Port}
- when tuple_size(Ip) =:= 8, is_integer(Port) ->
- tuple_to_list(Ip) ++ mk_bytes(Port);
+ {{A, B, C, D, E, F, G, H}, Port} ->
+ [A bsr 8, A band 255,
+ B bsr 8, B band 255,
+ C bsr 8, C band 255,
+ D bsr 8, D band 255,
+ E bsr 8, E band 255,
+ F bsr 8, F band 255,
+ G bsr 8, G band 255,
+ H bsr 8, H band 255,
+ Port bsr 8, Port band 255];
_ ->
erlang:error(badarg, [Domain,Address])
end;