From owner-svn-src-stable@freebsd.org Thu Oct 29 18:18:52 2020 Return-Path: Delivered-To: svn-src-stable@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 6AEA4459C9D; Thu, 29 Oct 2020 18:18:52 +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 4CMYbv0GCjz46Xb; Thu, 29 Oct 2020 18:18:50 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.229.168]) by shaw.ca with ESMTPA id YCVakUr75RAWfYCVbkY77n; Thu, 29 Oct 2020 12:18:48 -0600 X-Authority-Analysis: v=2.4 cv=P9aEOgMu c=1 sm=1 tr=0 ts=5f9b0789 a=7AlCcx2GqMg+lh9P3BclKA==:117 a=7AlCcx2GqMg+lh9P3BclKA==:17 a=xqWC_Br6kY4A:10 a=kj9zAlcOel0A:10 a=afefHYAZSVUA:10 a=6I5d2MoRAAAA:8 a=zfY9hoTtAAAA:8 a=FtSH8AnkAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=K21vTHoHs0vVa7GZ0N4A:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=5hhNq975vnbPBhNyUpu_:22 a=Bk7rEp8Xs0BjyB-fwPJV: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 780712FE7; Thu, 29 Oct 2020 11:18:45 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.16.1/8.16.1) with ESMTP id 09TIIjlV049416; Thu, 29 Oct 2020 11:18:45 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202010291818.09TIIjlV049416@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: Konstantin Belousov cc: Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: Re: svn commit: r367049 - stable/12/libexec/rc/rc.d In-reply-to: <20201029161751.GA2654@kib.kiev.ua> References: <202010260118.09Q1IGo7016376@repo.freebsd.org> <20201029161751.GA2654@kib.kiev.ua> Comments: In-reply-to Konstantin Belousov message dated "Thu, 29 Oct 2020 18:17:51 +0200." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 29 Oct 2020 11:18:45 -0700 X-CMAE-Envelope: MS4xfHId3XnIWLEYXXKKqnW9TzgiWAz+V++/2q2CSu54X+uRa9/ZxQRuJjwH+Xgb4bEbXse7/D6ARt5z78B/krJ2jXK0MQyZwHcaY+QTjVzXMd++VrSRT2i7 bAUP7+XNk61J5SwAiVK9dh0YtEHZeT90jiHxuwC0MotUBoS93q8fxzTVQ19XdZIuzSnbKEE+yJ6rTOADLrb63HDYnIiGvV+ugQyf609a39SSpT7XKfU20FBw NZiJ2uU4b1daIj+t2JGy4Z84pcnGyS/oTpDNkpRLH7mFZkzgaJQUqxknbR6s3WDoygV/HGco24Kc0Zp9x/crD1KnRUnPX+nZgmY/9adaDwLbup+Yk83HLxqy 4a1KxTnoT61LRiWDcpJEbP/4hoPbBw== X-Rspamd-Queue-Id: 4CMYbv0GCjz46Xb X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of cy.schubert@cschubert.com has no SPF policy when checking 64.59.136.139) smtp.mailfrom=cy.schubert@cschubert.com X-Spamd-Result: default: False [-0.89 / 15.00]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; RCPT_COUNT_FIVE(0.00)[6]; RCVD_COUNT_THREE(0.00)[4]; NEURAL_HAM_SHORT(-0.64)[-0.640]; FREEMAIL_TO(0.00)[gmail.com]; RECEIVED_SPAMHAUS_PBL(0.00)[70.67.229.168:received]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; MIME_TRACE(0.00)[0:+]; RCVD_IN_DNSWL_LOW(-0.10)[64.59.136.139:from]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.84)[-0.841]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-0.70)[-0.704]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[cschubert.com: no valid DMARC record]; AUTH_NA(1.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; R_SPF_NA(0.00)[no SPF record]; RWL_MAILSPIKE_VERYGOOD(0.00)[64.59.136.139:from]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-stable-12,svn-src-stable] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2020 18:18:52 -0000 In message <20201029161751.GA2654@kib.kiev.ua>, Konstantin Belousov writes: > On Mon, Oct 26, 2020 at 01:18:16AM +0000, Cy Schubert wrote: > > Author: cy > > Date: Mon Oct 26 01:18:15 2020 > > New Revision: 367049 > > URL: https://svnweb.freebsd.org/changeset/base/367049 > > > > Log: > > MFC r366857: > > Destroy cloned interfaces at netif stop, netif restart and shutdown. > > This is especially important during shutdown because a child interface > > of lagg with WOL enabled will not enable WOL at interface shutdown and > > thus no WOL to wake up the device (and machine). > > > > PR: 158734, 109980 > > Reported by: Antonio Huete Jimenez > > Marat N.Afanasyev > > reviewed by: kp > > > > Modified: > > stable/12/libexec/rc/rc.d/netif > > Directory Properties: > > stable/12/ (props changed) > > > > Modified: stable/12/libexec/rc/rc.d/netif > > =========================================================================== > === > > --- stable/12/libexec/rc/rc.d/netif Mon Oct 26 00:37:31 2020 (r36704 > 8) > > +++ stable/12/libexec/rc/rc.d/netif Mon Oct 26 01:18:15 2020 (r36704 > 9) > > @@ -28,7 +28,7 @@ > > # PROVIDE: netif > > # REQUIRE: FILESYSTEMS iovctl serial sppp sysctl > > # REQUIRE: hostid ipfs > > -# KEYWORD: nojailvnet > > +# KEYWORD: nojailvnet shutdown > > > > . /etc/rc.subr > > . /etc/network.subr > After this change, shutdown of my stable/12 router looks like this: > > Stopping devd. > Waiting for PIDS: 1120. > Oct 29 18:09:52 tom minissdpd[1619]: setsockopt(udp, IP_DROP_MEMBERSHIP)(vlan > 1): Can't assign requested address > /etc/rc.shutdown: WARNING: vlan1 does not exist. Skipped. > /etc/rc.shutdown: WARNING: vlan2 does not exist. Skipped. > /etc/rc.shutdown: WARNING: vlan3 does not exist. Skipped. > /etc/rc.shutdown: WARNING: vlan4 does not exist. Skipped. > /etc/rc.shutdown: WARNING: vlan5 does not exist. Skipped. > Stopping Network: lo0 re0 re1 pflog0 gif0. > lo0: flags=8048 metric 0 mtu 16384 > options=680003 > groups: lo > nd6 options=21 > re0: flags=8802 metric 0 mtu 1500 > options=201b > ether e0:d5:5e:50:93:04 > media: Ethernet autoselect (1000baseT ) > status: active > nd6 options=29 > re1: flags=8802 metric 0 mtu 1500 > options=201b > ether e0:d5:5e:50:93:05 > media: Ethernet autoselect (100baseTX ) > status: active > nd6 options=29 > pflog0: flags=100 metric 0 mtu 33160 > groups: pflog > gif0: flags=8010 metric 0 mtu 1280 > options=80000 > tunnel inet 176.36.249.139 --> 216.66.84.46 > groups: gif > nd6 options=21 > Destroyed clone interfaces: gif0. > Writing entropy file: . > . > Terminated > Oct 29 18:09:53 tom syslogd: exiting on signal 15 > pflog0: promiscuous mode disabled > Waiting (max 60 seconds) for system process `vnlru' to stop... done > Waiting (max 60 seconds) for system process `syncer' to stop... > Syncing disks, vnodes remaining... 14 2 2 1 1 1 0 0 0 0 done > The messages are innocuous. We could disable printing of the messages during shutdown though. The patch resolves an issue where one or both interfaces with WOL enabled are members of a lagg(4) and since the lagg(4) is not torn down during shutdown WOL isn't enabled in the NIC prior to power off. This results in no WOL when interfaces are members of a lagg(4). Without the patch my machines with lagg(4) fail to wake on lan after being powered off. Another alternative would be to tear down cloned interfaces in the kernel prior to calling device_shutdown or device_suspend for each physical interface, both of which enable WOL in drivers that support this feature. -- 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.