projects
/
privoxy.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use the IP_FREEBIND socket option, if defined
[privoxy.git]
/
jbsockets.c
diff --git
a/jbsockets.c
b/jbsockets.c
index
625d830
..
ab2228a
100644
(file)
--- a/
jbsockets.c
+++ b/
jbsockets.c
@@
-1068,6
+1068,10
@@
int bind_port(const char *hostnam, int portnum, int backlog, jb_socket *pfd)
setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (char *)&one, sizeof(one));
#endif /* ndef _WIN32 */
setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (char *)&one, sizeof(one));
#endif /* ndef _WIN32 */
+#ifdef IP_FREEBIND
+ setsockopt(fd, IPPROTO_IP, IP_FREEBIND, (char *)&one, sizeof(one));
+#endif
+
#ifdef HAVE_RFC2553
if (bind(fd, rp->ai_addr, rp->ai_addrlen) < 0)
#else
#ifdef HAVE_RFC2553
if (bind(fd, rp->ai_addr, rp->ai_addrlen) < 0)
#else