Skip to content

Commit

Permalink
Binding ip address in SCTP transport in client mode to supress SCTP m…
Browse files Browse the repository at this point in the history
…ultihoming
  • Loading branch information
platinumthinker committed Dec 6, 2018
1 parent 49da2ce commit 50ffc61
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions seagull/trunk/src/library-trans-extsctp/C_SocketSCTP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -896,6 +896,24 @@ int C_SocketSCTPClient::_open(T_pOpenStatus P_status,
if (m_type == E_SOCKET_TCP_MODE) {


/* struct sockaddr_storage *connect = NULL; */
/* unsigned int cc = 0, count = 0; */
/* if(m_remote_addr_info->m_addrs_dst > 0) { */
/* // SCTP MULTIHOMING CONNECT */
/* for (unsigned int i = 0; i < m_remote_addr_info->m_addrs_dst.size(); i++) { */
/* sockaddr_in addr = m_remote_addr_info->m_addrs_dst[i]; */
/* SOCKET_DEBUG(1, "multihoming client dst " << inet_ntoa(addr->sin_addr)); */
/* } */
/* } */
/* connect = reallock */
if(m_remote_addr_info->m_value != NULL) {
L_rc = bind(m_socket_id,
(sockaddr *)(void *)&(m_remote_addr_info->m_addr_src),
SOCKADDR_IN_SIZE(&(m_remote_addr_info->m_addr_src)));
if (L_rc) {
SOCKET_ERROR(1, "bind [" << strerror(errno) << "]");
}
}

L_rc = connect (m_socket_id,
(struct sockaddr*)(void*)&(m_remote_addr_info->m_addr),
Expand Down

0 comments on commit 50ffc61

Please sign in to comment.