Commit 171221f1 authored by Sebastien Decugis's avatar Sebastien Decugis
Browse files

Fix SCTP port when ListenOn is set (Patch by Vlada) - closes #20

parent 1d8ba0a1
......@@ -730,7 +730,7 @@ redo:
int count = 0; /* number of sock addr in the array */
/* Create the array of configured addresses */
CHECK_FCT( add_addresses_from_list_mask((void *)&sar, &sz, &count, family, port, list, EP_FL_CONF, EP_FL_CONF) );
CHECK_FCT( add_addresses_from_list_mask((void *)&sar, &sz, &count, family, htons(port), list, EP_FL_CONF, EP_FL_CONF) );
if (!count) {
/* None of the addresses in the list came from configuration, we bind to default */
......
......@@ -265,7 +265,7 @@ int fd_servers_start()
ASSERT(0);
#else /* DISABLE_SCTP */
/* Create the server on default port */
/* Create the server on unsecure port */
CHECK_MALLOC( s = new_serv(IPPROTO_SCTP, 0) );
CHECK_MALLOC( s->conn = fd_cnx_serv_sctp(fd_g_config->cnf_port, FD_IS_LIST_EMPTY(&fd_g_config->cnf_endpoints) ? NULL : &fd_g_config->cnf_endpoints) );
fd_list_insert_before( &FD_SERVERS, &s->chain );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment