diff options
author | Hans Nilsson <[email protected]> | 2015-12-07 15:06:49 +0100 |
---|---|---|
committer | Hans Nilsson <[email protected]> | 2015-12-07 15:06:49 +0100 |
commit | b424835b0d08c9fdf2650782e481e3e7a08eb1ae (patch) | |
tree | 4b4e13523b523162cae22b1e1ffc85838acd3ca6 /lib/ssh/test/ssh_test_lib.erl | |
parent | 52701a71707e44bef90c7ad8db8dc8a0f9a1feaf (diff) | |
download | otp-b424835b0d08c9fdf2650782e481e3e7a08eb1ae.tar.gz otp-b424835b0d08c9fdf2650782e481e3e7a08eb1ae.tar.bz2 otp-b424835b0d08c9fdf2650782e481e3e7a08eb1ae.zip |
ssh: add check for available ipv6 addr in test case
Diffstat (limited to 'lib/ssh/test/ssh_test_lib.erl')
-rw-r--r-- | lib/ssh/test/ssh_test_lib.erl | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/ssh/test/ssh_test_lib.erl b/lib/ssh/test/ssh_test_lib.erl index 424afc76fe..ed76f4f795 100644 --- a/lib/ssh/test/ssh_test_lib.erl +++ b/lib/ssh/test/ssh_test_lib.erl @@ -646,3 +646,15 @@ ssh_supports(Alg, SshDefaultAlg_tag) -> {false,UnSup} end end. + +%%%---------------------------------------------------------------- +has_inet6_address() -> + try + [throw(6) || {ok,L} <- [inet:getifaddrs()], + {_,L1} <- L, + {addr,{_,_,_,_,_,_,_,_}} <- L1] + of + [] -> false + catch + throw:6 -> true + end. |