FS-7396: #resolve update dtls socket when socket changes on auto-adjust that changes address families and also include link local v6 addresses in approrpiate auto acls
This commit is contained in:
parent
f5d40ba84a
commit
183570bd94
|
@ -1322,6 +1322,7 @@ SWITCH_DECLARE(void) switch_load_network_lists(switch_bool_t reload)
|
|||
switch_network_list_add_cidr(rfc_list, "10.0.0.0/8", SWITCH_TRUE);
|
||||
switch_network_list_add_cidr(rfc_list, "172.16.0.0/12", SWITCH_TRUE);
|
||||
switch_network_list_add_cidr(rfc_list, "192.168.0.0/16", SWITCH_TRUE);
|
||||
switch_network_list_add_cidr(rfc_list, "fe80::/10", SWITCH_TRUE);
|
||||
switch_core_hash_insert(IP_LIST.hash, tmp_name, rfc_list);
|
||||
|
||||
tmp_name = "wan.auto";
|
||||
|
@ -1332,6 +1333,7 @@ SWITCH_DECLARE(void) switch_load_network_lists(switch_bool_t reload)
|
|||
switch_network_list_add_cidr(rfc_list, "172.16.0.0/12", SWITCH_FALSE);
|
||||
switch_network_list_add_cidr(rfc_list, "192.168.0.0/16", SWITCH_FALSE);
|
||||
switch_network_list_add_cidr(rfc_list, "169.254.0.0/16", SWITCH_FALSE);
|
||||
switch_network_list_add_cidr(rfc_list, "fe80::/10", SWITCH_FALSE);
|
||||
switch_core_hash_insert(IP_LIST.hash, tmp_name, rfc_list);
|
||||
|
||||
tmp_name = "nat.auto";
|
||||
|
|
|
@ -488,25 +488,6 @@ static void switch_rtp_change_ice_dest(switch_rtp_t *rtp_session, switch_rtp_ice
|
|||
if (!is_rtcp || rtp_session->flags[SWITCH_RTP_FLAG_RTCP_MUX]) {
|
||||
switch_rtp_set_remote_address(rtp_session, host, port, 0, SWITCH_FALSE, &err);
|
||||
}
|
||||
|
||||
if (rtp_session->dtls) {
|
||||
|
||||
if (!is_rtcp || rtp_session->flags[SWITCH_RTP_FLAG_RTCP_MUX]) {
|
||||
switch_sockaddr_info_get(&rtp_session->dtls->remote_addr, host, SWITCH_UNSPEC, port, 0, rtp_session->pool);
|
||||
}
|
||||
|
||||
if (is_rtcp && !rtp_session->flags[SWITCH_RTP_FLAG_RTCP_MUX]) {
|
||||
|
||||
switch_sockaddr_info_get(&rtp_session->rtcp_remote_addr, host, SWITCH_UNSPEC, port, 0, rtp_session->pool);
|
||||
if (rtp_session->rtcp_dtls) {
|
||||
//switch_sockaddr_info_get(&rtp_session->rtcp_dtls->remote_addr, host, SWITCH_UNSPEC, port, 0, rtp_session->pool);
|
||||
rtp_session->rtcp_dtls->remote_addr = rtp_session->rtcp_remote_addr;
|
||||
rtp_session->rtcp_dtls->sock_output = rtp_session->rtcp_sock_output;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -2769,10 +2750,19 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_set_remote_address(switch_rtp_t *rtp_
|
|||
if ((status = switch_socket_create(&rtp_session->sock_output,
|
||||
switch_sockaddr_get_family(rtp_session->remote_addr),
|
||||
SOCK_DGRAM, 0, rtp_session->pool)) != SWITCH_STATUS_SUCCESS) {
|
||||
|
||||
*err = "Socket Error!";
|
||||
}
|
||||
}
|
||||
|
||||
if (rtp_session->dtls) {
|
||||
rtp_session->dtls->sock_output = rtp_session->sock_output;
|
||||
|
||||
if (rtp_session->flags[SWITCH_RTP_FLAG_RTCP_MUX]) {
|
||||
switch_sockaddr_info_get(&rtp_session->dtls->remote_addr, host, SWITCH_UNSPEC, port, 0, rtp_session->pool);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (rtp_session->flags[SWITCH_RTP_FLAG_ENABLE_RTCP] && !rtp_session->flags[SWITCH_RTP_FLAG_RTCP_MUX]) {
|
||||
if (remote_rtcp_port) {
|
||||
|
@ -2781,6 +2771,12 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_set_remote_address(switch_rtp_t *rtp_
|
|||
rtp_session->remote_rtcp_port = rtp_session->eff_remote_port + 1;
|
||||
}
|
||||
status = enable_remote_rtcp_socket(rtp_session, err);
|
||||
|
||||
if (rtp_session->rtcp_dtls) {
|
||||
//switch_sockaddr_info_get(&rtp_session->rtcp_dtls->remote_addr, host, SWITCH_UNSPEC, port, 0, rtp_session->pool);
|
||||
rtp_session->rtcp_dtls->remote_addr = rtp_session->rtcp_remote_addr;
|
||||
rtp_session->rtcp_dtls->sock_output = rtp_session->rtcp_sock_output;
|
||||
}
|
||||
}
|
||||
|
||||
if (rtp_session->flags[SWITCH_RTP_FLAG_ENABLE_RTCP] && rtp_session->flags[SWITCH_RTP_FLAG_RTCP_MUX]) {
|
||||
|
|
Loading…
Reference in New Issue