This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Inetutils ".
The branch, master has been updated
via e9a6037fb15d706a00a9212c1e3a3c1b89ab9429 (commit)
from f84a8f027c1b5989b7bbbe1cde8748909314734d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=e9a6037fb15d706a00a9212c1e3a3c1b89ab9429
commit e9a6037fb15d706a00a9212c1e3a3c1b89ab9429
Author: Mats Erik Andersson <[email protected]>
Date: Fri Nov 23 16:45:51 2012 +0100
syslogd: Reuse socket addresses.
diff --git a/ChangeLog b/ChangeLog
index 9d0cad3..ab9b7a1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2012-11-23 Mats Erik Andersson <[email protected]>
+ syslogd: Reusable IP sockets.
+ Automated test systems seemingly fail here.
+
+ * src/syslogd.c (create_inet_socket): Set socket
+ option SO_REUSEADDR on IP sockets.
+
+2012-11-23 Mats Erik Andersson <[email protected]>
+
ifconfig: Output formatting.
* ifconfig/options.c (formats) <gnu format>:
diff --git a/src/syslogd.c b/src/syslogd.c
index 4fa459a..3568c93 100644
--- a/src/syslogd.c
+++ b/src/syslogd.c
@@ -888,15 +888,21 @@ create_inet_socket (int af, int fd46[2])
for (ai = rp; ai; ai = ai->ai_next)
{
+ int yes = 1;
+
fd = socket (ai->ai_family, ai->ai_socktype, ai->ai_protocol);
if (fd < 0)
continue;
if (ai->ai_family == AF_INET6)
{
- int yes = 1;
/* Avoid dual stacked sockets. Better to use distinct sockets. */
(void) setsockopt (fd, IPPROTO_IPV6, IPV6_V6ONLY, &yes, sizeof (yes));
}
+
+ err = setsockopt (fd, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof (yes));
+ if (err < 0)
+ logerror ("failed to set SO_REUSEADDR");
+
if (bind (fd, ai->ai_addr, ai->ai_addrlen) < 0)
{
close (fd);
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 8 ++++++++
src/syslogd.c | 8 +++++++-
2 files changed, 15 insertions(+), 1 deletions(-)
hooks/post-receive
--
GNU Inetutils
_______________________________________________
Commit-inetutils mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/commit-inetutils