[shibboleth-sp2] 12/18: Backport setsockopt fix.
Ferenc Wágner
wferi-guest at moszumanska.debian.org
Tue Jan 26 21:29:31 UTC 2016
This is an automated email from the git hooks/post-receive script.
wferi-guest pushed a commit to annotated tag 1.2.1b
in repository shibboleth-sp2.
commit 9c5001b435320d4443c97a1ce4352ff4341dbc23
Author: Scott Cantor <cantor.2 at osu.edu>
Date: Sun Apr 3 23:28:28 2005 +0000
Backport setsockopt fix.
---
shib-target/shib-sock.cpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/shib-target/shib-sock.cpp b/shib-target/shib-sock.cpp
index 4966a0b..8e74479 100644
--- a/shib-target/shib-sock.cpp
+++ b/shib-target/shib-sock.cpp
@@ -187,6 +187,11 @@ bool TCPListener::bind(ShibSocket& s, bool force) const
{
struct sockaddr_in addr;
setup_tcp_sockaddr(&addr);
+
+ // XXX: Do we care about the return value from setsockopt?
+ int opt = 1;
+ ::setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (const char*)&opt, sizeof(opt));
+
#ifdef WIN32
if (SOCKET_ERROR==::bind(s,(struct sockaddr *)&addr,sizeof(addr)) || SOCKET_ERROR==::listen(s,3)) {
log_error();
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-shibboleth/shibboleth-sp2.git
More information about the Pkg-shibboleth-devel
mailing list