From 002738e77ae6149c43a3d55b9364d365e1483578 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Thu, 11 Nov 2010 16:38:05 +0000 Subject: Don't force connections to come from same source port. Also allow address reuse for connections in time wait state. --- common/spio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'common/spio.c') diff --git a/common/spio.c b/common/spio.c index f8f2ef1..e9a22e0 100644 --- a/common/spio.c +++ b/common/spio.c @@ -180,7 +180,8 @@ int spio_connect(spctx_t* ctx, spio_t* io, const struct sockaddr_any* sdst, if (ssrc != NULL) { #ifdef HAVE_IP_TRANSPARENT int value = 1; - if(setsockopt(fd, SOL_IP, IP_TRANSPARENT, &value, sizeof(value)) < 0) { + if(setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &value, sizeof(value)) < 0 || + setsockopt(fd, SOL_IP, IP_TRANSPARENT, &value, sizeof(value)) < 0) { sp_message(ctx, LOG_DEBUG, "%s: couldn't set transparent mode on connection", GET_IO_NAME(io)); ssrc = NULL; -- cgit v1.2.3