aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp/test/snmp_test_mgr.erl
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2019-06-24 14:48:38 +0200
committerMicael Karlberg <[email protected]>2019-06-24 14:48:38 +0200
commitba72ec760adfc8c35628d7e02477d4b0f42d0e07 (patch)
treebc7e122d15dedd243cbfea6e5a10a4d5f32f4712 /lib/snmp/test/snmp_test_mgr.erl
parent8f67452510ce9544331d5d3a82cd152d2333bc0e (diff)
parent9e0dbd341d738e0c8a268752f131fa6ab6195ad3 (diff)
downloadotp-ba72ec760adfc8c35628d7e02477d4b0f42d0e07.tar.gz
otp-ba72ec760adfc8c35628d7e02477d4b0f42d0e07.tar.bz2
otp-ba72ec760adfc8c35628d7e02477d4b0f42d0e07.zip
Merge branch 'bmk/snmp/20190524/ipv6_issues/OTP-15764' into maint
Diffstat (limited to 'lib/snmp/test/snmp_test_mgr.erl')
-rw-r--r--lib/snmp/test/snmp_test_mgr.erl17
1 files changed, 14 insertions, 3 deletions
diff --git a/lib/snmp/test/snmp_test_mgr.erl b/lib/snmp/test/snmp_test_mgr.erl
index 9190c07e6d..9d6be65088 100644
--- a/lib/snmp/test/snmp_test_mgr.erl
+++ b/lib/snmp/test/snmp_test_mgr.erl
@@ -247,10 +247,21 @@ init({Options, CallerPid}) ->
IpFamily = get_value(ipfamily, Options, inet),
print("[~w] ~p -> IpFamily: ~p~n", [?MODULE, self(), IpFamily]),
AgIp = case snmp_misc:assq(agent, Options) of
- {value, Tuple4} when is_tuple(Tuple4) andalso
- (size(Tuple4) =:= 4) ->
- Tuple4;
+ {value, Addr} when is_tuple(Addr) andalso
+ (size(Addr) =:= 4) andalso
+ (IpFamily =:= inet) ->
+ print("[~w] ~p -> Addr: ~p~n",
+ [?MODULE, self(), Addr]),
+ Addr;
+ {value, Addr} when is_tuple(Addr) andalso
+ (size(Addr) =:= 8) andalso
+ (IpFamily =:= inet6) ->
+ print("[~w] ~p -> Addr: ~p~n",
+ [?MODULE, self(), Addr]),
+ Addr;
{value, Host} when is_list(Host) ->
+ print("[~w] ~p -> Host: ~p~n",
+ [?MODULE, self(), Host]),
{ok, Ip} = snmp_misc:ip(Host, IpFamily),
Ip
end,