svn commit: r285910 - in head: lib/libc/sys sys/kern sys/sys

Ed Schouten ed at nuxi.nl
Sun Aug 9 07:37:20 UTC 2015


Hi Alexander,

2015-08-08 21:05 GMT+02:00 Alexander Kabaev <kabaev at 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 at nuxi.nl>
Nuxi, 's-Hertogenbosch, the Netherlands
KvK/VAT number: 62051717
-------------- next part --------------
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;


More information about the svn-src-head mailing list