mirror of
https://github.com/processone/ejabberd.git
synced 2024-06-16 22:05:29 +02:00
mod_stun_disco: Fix parsing of IPv6 listeners
Don't crash if `mod_stun_disco` is used with `offer_local_services` and an IPv6 listener has an explicit `ip:` address configured. Thanks to Daniel Kenzelmann for reporting the issue.
This commit is contained in:
parent
24742031e9
commit
42bdb501ca
|
@ -646,7 +646,7 @@ get_listener_ips(#{ip := {0, 0, 0, 0, 0, 0, 0, 1}} = Opts) ->
|
||||||
{undefined, get_turn_ipv6_addr(Opts)};
|
{undefined, get_turn_ipv6_addr(Opts)};
|
||||||
get_listener_ips(#{ip := {_, _, _, _} = IP}) ->
|
get_listener_ips(#{ip := {_, _, _, _} = IP}) ->
|
||||||
{IP, undefined};
|
{IP, undefined};
|
||||||
get_listener_ips(#{ip := {_, _, _, _, _,_, _, _, _} = IP}) ->
|
get_listener_ips(#{ip := {_, _, _, _, _, _, _, _} = IP}) ->
|
||||||
{undefined, IP}.
|
{undefined, IP}.
|
||||||
|
|
||||||
-spec get_turn_ipv4_addr(map()) -> inet:ip4_address() | undefined.
|
-spec get_turn_ipv4_addr(map()) -> inet:ip4_address() | undefined.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user