Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117518877
D437.1774852911.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D437.1774852911.diff
View Options
diff --git a/apps/kolab_guam/src/kolab_guam_listener.erl b/apps/kolab_guam/src/kolab_guam_listener.erl
--- a/apps/kolab_guam/src/kolab_guam_listener.erl
+++ b/apps/kolab_guam/src/kolab_guam_listener.erl
@@ -75,7 +75,23 @@
listen_options(none, Addr)
end.
-default_listen_options() -> [ { reuseaddr, true }, {active, false}, inet6 ].
+default_listen_options() -> [ { reuseaddr, true }, {active, false} | ipv6_opts() ].
+
+ipv6_opts() ->
+ case check_for_ipv6(inet:getifaddrs()) of
+ true -> [inet6];
+ _ -> []
+ end.
+
+check_for_ipv6({ok, Ifaddrs}) -> check_for_ipv6(Ifaddrs);
+check_for_ipv6([]) -> false;
+check_for_ipv6([{_iface, Attrs}|Ifaddrs]) ->
+ Addrs = proplists:get_all_values(addr, Attrs),
+ case lists:any(fun(Addr) -> size(Addr) == 8 end, Addrs) of
+ true -> true;
+ _ -> check_for_ipv6(Ifaddrs)
+ end;
+check_for_ipv6(_) -> false.
create_initial_listeners(ListenerPoolSize, PID) when is_pid(PID) ->
lager:debug("Creating session pool of size ~p for listener ~p", [ListenerPoolSize, PID]),
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Mar 30, 6:41 AM (3 d, 11 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18794898
Default Alt Text
D437.1774852911.diff (1 KB)
Attached To
Mode
D437: attempt to autodetect when ipv6 is available
Attached
Detach File
Event Timeline