summaryrefslogtreecommitdiff
path: root/libfdcore/p_cnx.c
diff options
context:
space:
mode:
Diffstat (limited to 'libfdcore/p_cnx.c')
-rw-r--r--libfdcore/p_cnx.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libfdcore/p_cnx.c b/libfdcore/p_cnx.c
index 9dc2a03..009e73d 100644
--- a/libfdcore/p_cnx.c
+++ b/libfdcore/p_cnx.c
@@ -2,7 +2,7 @@
* Software License Agreement (BSD License) *
* Author: Sebastien Decugis <sdecugis@freediameter.net> *
* *
-* Copyright (c) 2013, WIDE Project and NICT *
+* Copyright (c) 2020, WIDE Project and NICT *
* All rights reserved. *
* *
* Redistribution and use of this software in source and binary forms, with or without modification, are *
@@ -261,12 +261,14 @@ static void * connect_thr(void * arg)
switch (nc->proto) {
case IPPROTO_TCP:
+/* TODO: use no_bind and first of cnf_endpoints of nc->ss.sa_family ? */
cnx = fd_cnx_cli_connect_tcp((sSA *)&nc->ss, sSAlen(&nc->ss));
break;
#ifndef DISABLE_SCTP
case IPPROTO_SCTP:
cnx = fd_cnx_cli_connect_sctp((peer->p_hdr.info.config.pic_flags.pro3 == PI_P3_IP) ? 1 : fd_g_config->cnf_flags.no_ip6,
- nc->port, &peer->p_hdr.info.pi_endpoints);
+ nc->port, &peer->p_hdr.info.pi_endpoints,
+ fd_g_config->cnf_flags.no_bind ? NULL : &fd_g_config->cnf_endpoints);
break;
#endif /* DISABLE_SCTP */
}