]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
res_pjsip_t38.c: Permit IPv6 SDP connection addresses.
authorSean Bright <sean@seanbright.com>
Mon, 29 Jan 2024 13:51:34 +0000 (08:51 -0500)
committerSean Bright <sean@seanbright.com>
Tue, 30 Jan 2024 19:06:38 +0000 (19:06 +0000)
The existing code prevented IPv6 addresses from being properly parsed.

Fixes #558

res/res_pjsip_t38.c

index 681fabbf73df69affb429e30efe3b6c028569b58..86aa8c19211290a5d579f4e1060a52f3ac649fe7 100644 (file)
@@ -883,7 +883,7 @@ static int negotiate_incoming_sdp_stream(struct ast_sip_session *session,
        ast_copy_pj_str(host, stream->conn ? &stream->conn->addr : &sdp->conn->addr, sizeof(host));
 
        /* Ensure that the address provided is valid */
-       if (ast_sockaddr_resolve(&addrs, host, PARSE_PORT_FORBID, AST_AF_INET) <= 0) {
+       if (ast_sockaddr_resolve(&addrs, host, PARSE_PORT_FORBID, AST_AF_UNSPEC) <= 0) {
                /* The provided host was actually invalid so we error out this negotiation */
                ast_debug(3, "Declining; provided host is invalid\n");
                return 0;