diff options
author | Holger Weiss <holger@zedat.fu-berlin.de> | 2021-12-18 17:50:26 +0100 |
---|---|---|
committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2021-12-18 17:50:26 +0100 |
commit | 42bdb501caf7039f71f3a26ae447db3bffaecb0a (patch) | |
tree | ae591377ca7fc5a5619d549fb2fe796b6489b501 /src/mod_stun_disco.erl | |
parent | Revert "Github Actions: use MD5 pass encryption to support PostgreSQL 14 (#36... (diff) |
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.
Diffstat (limited to 'src/mod_stun_disco.erl')
-rw-r--r-- | src/mod_stun_disco.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mod_stun_disco.erl b/src/mod_stun_disco.erl index 6e7592453..cbb671639 100644 --- a/src/mod_stun_disco.erl +++ b/src/mod_stun_disco.erl @@ -646,7 +646,7 @@ get_listener_ips(#{ip := {0, 0, 0, 0, 0, 0, 0, 1}} = Opts) -> {undefined, get_turn_ipv6_addr(Opts)}; get_listener_ips(#{ip := {_, _, _, _} = IP}) -> {IP, undefined}; -get_listener_ips(#{ip := {_, _, _, _, _,_, _, _, _} = IP}) -> +get_listener_ips(#{ip := {_, _, _, _, _, _, _, _} = IP}) -> {undefined, IP}. -spec get_turn_ipv4_addr(map()) -> inet:ip4_address() | undefined. |