From owner-svn-src-all@freebsd.org Sat Nov 7 17:54:27 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 441424660FE; Sat, 7 Nov 2020 17:54:27 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CT4dZ61r5z3NCZ; Sat, 7 Nov 2020 17:54:26 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.229.168]) by shaw.ca with ESMTPA id bSPvkaAqJRAWfbSPwk3T8f; Sat, 07 Nov 2020 10:54:25 -0700 X-Authority-Analysis: v=2.4 cv=P9aEOgMu c=1 sm=1 tr=0 ts=5fa6df51 a=7AlCcx2GqMg+lh9P3BclKA==:117 a=7AlCcx2GqMg+lh9P3BclKA==:17 a=xqWC_Br6kY4A:10 a=kj9zAlcOel0A:10 a=nNwsprhYR40A:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=44SlTVGIrHYTBSnO2aoA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [IPv6:fc00:1:1:1::5b]) by spqr.komquats.com (Postfix) with ESMTPS id A4CE4F3; Sat, 7 Nov 2020 09:54:22 -0800 (PST) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.16.1/8.16.1) with ESMTP id 0A7HsMN5063934; Sat, 7 Nov 2020 09:54:22 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202011071754.0A7HsMN5063934@slippy.cwsent.com> X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Bryan Drewery cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r367455 - head/usr.sbin/syslogd In-reply-to: <202011071718.0A7HIjDY003915@repo.freebsd.org> References: <202011071718.0A7HIjDY003915@repo.freebsd.org> Comments: In-reply-to Bryan Drewery message dated "Sat, 07 Nov 2020 17:18:45 +0000." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 07 Nov 2020 09:54:22 -0800 X-CMAE-Envelope: MS4xfI+rbBeUgXTjz3eNEz36AVe7w+10YjplXt5T9T4int01r9/FJHILlFmnJQN+EwjTnj8CKqeSFO0GGD8IX8B05HmIMNR1UCDVZqehaEQQlHK0zL6B4Aqx 7cYZ4Qcqnd3IV9X2Jzct+7afR2RbYGwVd2ymGL2oi1nxP9Dm5Y6jbPyvMTc7EBGWgkJuOXDn8jFNMnEwXx38EJ1huMCdLtABbQZ5lRW29UZyfvh16nshEg2c 7qniuUd0MiNnIE7n8LHc5Aez3O3XV5uixK5lNulb8mQGn8EackRZRUAgYew+tEhO5+emFZlGNsVEJDKsGUSM6Q== X-Rspamd-Queue-Id: 4CT4dZ61r5z3NCZ X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2020 17:54:27 -0000 In message <202011071718.0A7HIjDY003915@repo.freebsd.org>, Bryan Drewery writes : > Author: bdrewery > Date: Sat Nov 7 17:18:44 2020 > New Revision: 367455 > URL: https://svnweb.freebsd.org/changeset/base/367455 > > Log: > syslogd: Stop trying to send remote messages through special sockets > > Specifically this was causing the /dev/klog fd and the signal pipe > handling fd to get a sendmsg(2) called on them and always returned > [ENOTSOCK]. > > r310350 combined these sockets into the main socket list and properly > skipped AF_UNSPEC at the sendmsg(2) call but later in r344739 it was > broken such that these special sockets were no longer excluded since > the AF_UNSPEC check specifically excluded these special sockets. Only > these special sockets have sl_sa = NULL. The sl_family checks should > be redundant now but are left in case of future changes so the intent > is clearer. > > MFC after: 2 weeks > > Modified: > head/usr.sbin/syslogd/syslogd.c > > Modified: head/usr.sbin/syslogd/syslogd.c > ============================================================================= > = > --- head/usr.sbin/syslogd/syslogd.c Sat Nov 7 16:58:38 2020 (r36745 > 4) > +++ head/usr.sbin/syslogd/syslogd.c Sat Nov 7 17:18:44 2020 (r36745 > 5) > @@ -1871,9 +1871,9 @@ fprintlog_write(struct filed *f, struct iovlist *il, i > STAILQ_FOREACH(sl, &shead, next) { > if (sl->sl_socket < 0) > continue; > - if (sl->sl_sa != NULL && > - (sl->sl_family == AF_LOCAL || > - sl->sl_family == AF_UNSPEC)) > + if (sl->sl_sa == NULL || > + sl->sl_family == AF_UNSPEC || > + sl->sl_family == AF_LOCAL) { The extraneous left brace broke the build. > continue; > lsent = sendmsg(sl->sl_socket, &msghdr, 0); > if (lsent == (ssize_t)il->totalsize) > -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org The need of the many outweighs the greed of the few.