Date: Sun, 9 Aug 2015 09:37:13 +0200 From: Ed Schouten <ed@nuxi.nl> To: Alexander Kabaev <kabaev@gmail.com> Cc: Ed Schouten <ed@freebsd.org>, src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r285910 - in head: lib/libc/sys sys/kern sys/sys Message-ID: <CABh_MK=PjDUh73aPEX5yTdkgCJ--3NwKV7ZS6KvP5GYfOU1aYw@mail.gmail.com> In-Reply-To: <20150808150539.0b43cfcd@kan> References: <201507271317.t6RDHwpj067194@repo.freebsd.org> <20150808150539.0b43cfcd@kan>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
Hi Alexander,
2015-08-08 21:05 GMT+02:00 Alexander Kabaev <kabaev@gmail.com>:
> this commit broke more than just syslogd. rtsol and rtsold both are
> victims of the change as they are trying to shutdown unconnected
> raw sockets to make then 'send-only' and fail.
Good catch! I think that in this case it is safe to omit the call to
shutdown(), or at least not let the application fail on startup
because of shutdown() being more strict. After all, this code would
fail on Linux, OS X, etc. already because of this.
Could you test the attached patch and let me know whether it makes
rtsol/rtsold work again?
Thanks,
--
Ed Schouten <ed@nuxi.nl>
Nuxi, 's-Hertogenbosch, the Netherlands
KvK/VAT number: 62051717
[-- Attachment #2 --]
diff --git a/usr.sbin/rtsold/probe.c b/usr.sbin/rtsold/probe.c
index 89a1617a..3aa5303 100644
--- a/usr.sbin/rtsold/probe.c
+++ b/usr.sbin/rtsold/probe.c
@@ -80,12 +80,6 @@ probe_init(void)
return (-1);
}
- /* make the socket send-only */
- if (shutdown(probesock, 0)) {
- warnmsg(LOG_ERR, __func__, "shutdown: %s", strerror(errno));
- return (-1);
- }
-
/* initialize msghdr for sending packets */
sndmhdr.msg_namelen = sizeof(struct sockaddr_in6);
sndmhdr.msg_iov = sndiov;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CABh_MK=PjDUh73aPEX5yTdkgCJ--3NwKV7ZS6KvP5GYfOU1aYw>
