Reported-by: Michal Matyska, michal.matyska at iptel org
... | ... |
@@ -216,6 +216,15 @@ static int sctp_init_sock_opt_common(int s) |
216 | 216 |
} |
217 | 217 |
} |
218 | 218 |
|
219 |
+ /* set reuseaddr */ |
|
220 |
+ if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, |
|
221 |
+ (void*)&optval, sizeof(optval))==-1){ |
|
222 |
+ LOG(L_ERR, "ERROR: sctp_init_sock_opt_common: setsockopt:" |
|
223 |
+ " SO_REUSEADDR (%d): %s\n", optval, strerror(errno)); |
|
224 |
+ /* continue, non-critical */ |
|
225 |
+ } |
|
226 |
+ |
|
227 |
+ |
|
219 | 228 |
/* disable fragments interleave (SCTP_FRAGMENT_INTERLEAVE) -- |
220 | 229 |
* we don't want partial delivery, so fragment interleave must be off too |
221 | 230 |
*/ |