|
@@ -468,14 +468,17 @@ static int sctp_init_sock_opt_common(int s, int af)
|
|
|
/* continue since this is not critical */
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- /* Allow bind to non local address. Required when daemon started before network initialized */
|
|
|
+
|
|
|
+#if defined(IP_FREEBIND)
|
|
|
+ /* allow bind to non local address.
|
|
|
+ * useful when daemon started before network initialized */
|
|
|
optval = 1;
|
|
|
if (setsockopt(s, IPPROTO_IP, IP_FREEBIND,
|
|
|
(void*)&optval, sizeof(optval)) ==-1) {
|
|
|
- LM_WARN("sctp_init_sock_opt_common: setsockopt freebind %s\n", strerror(errno));
|
|
|
+ LM_WARN("setsockopt freebind failed: %s\n", strerror(errno));
|
|
|
/* continue since this is not critical */
|
|
|
}
|
|
|
+#endif
|
|
|
|
|
|
/* set receive buffer: SO_RCVBUF*/
|
|
|
if (cfg_get(sctp, sctp_cfg, so_rcvbuf)){
|
|
@@ -487,7 +490,7 @@ static int sctp_init_sock_opt_common(int s, int af)
|
|
|
/* continue, non-critical */
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/* set send buffer: SO_SNDBUF */
|
|
|
if (cfg_get(sctp, sctp_cfg, so_sndbuf)){
|
|
|
optval=cfg_get(sctp, sctp_cfg, so_sndbuf);
|