From 2ceb609edb64e930300806e75dc1a45386f800ef Mon Sep 17 00:00:00 2001 From: Guido Falsi Date: Tue, 22 Nov 2016 18:20:06 +0100 Subject: res_rtp: Fix regression when IPv6 is not available. The latest Release candidate fails to create RTP streams when IPv6 is not available. Due to the changes made in September the ast_sockaddr structure passed around to create these streams is always of AF_INET6 type, causing failure when used for IPv4. This patch adds a utility function to check for availability of IPv6 and applies such check at startup to determine how to create the ast_sockaddr structures. ASTERISK-26617 #close Change-Id: I627a4e91795e821111e1cda523f083a40d0e0c3e --- include/asterisk/utils.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/asterisk') diff --git a/include/asterisk/utils.h b/include/asterisk/utils.h index a504a5da1..4a5dbf282 100644 --- a/include/asterisk/utils.h +++ b/include/asterisk/utils.h @@ -1127,4 +1127,13 @@ int ast_file_is_readable(const char *filename); */ int ast_compare_versions(const char *version1, const char *version2); +/* + * \brief Test that an OS supports IPv6 Networking. + * \since 13.14.0 + * + * \return True (non-zero) if the IPv6 supported. + * \return False (zero) if the OS doesn't support IPv6. + */ +int ast_check_ipv6(void); + #endif /* _ASTERISK_UTILS_H */ -- cgit v1.2.3