/etc/rc.d/netif script doesn't destroy cloned interfaces, e.g. vlanXX, when called with restart parameter. This leads to impossibility to reconfigure cloned devices, because of error produced by ifconfig. Before restart interfaces one should destroy all cloned interfaces manually Fix: n/a How-To-Repeat: add cloned_interfaces to /etc/rc.conf: cloned_interfaces="vlan2" add ifconfig_vlan2 to /etc/rc.conf: ifconfig_vlan2="vlan 2 vlandev ifXX 192.168.0.1 255.255.255.0" try to restart netifs two times look to: ifconfig: SIOCIFCREATE: File exists error string, and look to vlan2 interface.
The most realistinc solution to this problem is probably do simply disable the restart case. I don't think it's going to be practical to support restart. -- Brooks
I think that if we create cloned interfaces at start, we should destroy them when shutting down. -- SY, Marat
Responsible Changed From-To: freebsd-bugs->freebsd-rc Over to the rc list for consideration.
State Changed From-To: open->closed From rc.d/netif, you can use clonedown and then cloneup to reset cloned interfaces.
This is not fixed. See PR/158734 for the patch.
This is a DUP of PR/158734. Closing this PR in lieu of PR/158734. See 158734 for the proposed patch. *** This bug has been marked as a duplicate of bug 158734 ***
A commit references this bug: Author: cy Date: Mon Oct 19 20:37:39 UTC 2020 New revision: 366857 URL: https://svnweb.freebsd.org/changeset/base/366857 Log: 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 <tuxillo at quantumachine.net> Marat N.Afanasyev <marat at zealot.ksu.ru> reviewed by: kp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D26797 Changes: head/libexec/rc/rc.d/netif
A commit references this bug: Author: cy Date: Mon Oct 26 01:18:16 UTC 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 <tuxillo at quantumachine.net> Marat N.Afanasyev <marat at zealot.ksu.ru> reviewed by: kp Changes: _U stable/12/ stable/12/libexec/rc/rc.d/netif
A commit references this bug: Author: cy Date: Mon Oct 26 01:23:15 UTC 2020 New revision: 367050 URL: https://svnweb.freebsd.org/changeset/base/367050 Log: This is a direct commit to stable/11 however it performs MFC r366857 applied to stable/12 with r367049. This is due to src/etc/rc.d/netif having been previously moved to src/libexec/rc.d/netif. 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 <tuxillo at quantumachine.net> Marat N.Afanasyev <marat at zealot.ksu.ru> reviewed by: kp Changes: stable/11/etc/rc.d/netif
A commit references this bug: Author: cy Date: Fri Dec 4 19:31:16 UTC 2020 New revision: 368345 URL: https://svnweb.freebsd.org/changeset/base/368345 Log: Revert r366857. r366857 created a number of problems, tearing down interfaces too early in shutdown. This resulted in: - hung ssh sessions when shutting down or rebooting remotely using shutdown (I've used exec shutdown, for years, as apposed to simply shutdown). - NFS mounted filesystems "disappear" prior to unmount. - dhclient attached to a VLAN on an interface who's parent interface has already shut down prints errors. The path forward is to teach lagg(4) and vlan(4) about WOL. PR: 251531, 251540 PR: 158734, 109980 are broken again Reported by: jhb, emaste, jtl, Helge Oldach<freebsd_oldach.net> Martin Birgmeier <d8zNeCFG_aon.at> MFC after: Immediately Discussion at: https://reviews.freebsd.org/D27459 Changes: head/libexec/rc/rc.d/netif
A commit references this bug: Author: cy Date: Fri Dec 4 19:35:44 UTC 2020 New revision: 368346 URL: https://svnweb.freebsd.org/changeset/base/368346 Log: Revert r366857. r366857 created a number of problems, tearing down interfaces too early in shutdown. This resulted in: - hung ssh sessions when shutting down or rebooting remotely using shutdown (I've used exec shutdown, for years, as apposed to simply shutdown). - NFS mounted filesystems "disappear" prior to unmount. - dhclient attached to a VLAN on an interface who's parent interface has already shut down prints errors. The path forward is to teach lagg(4) and vlan(4) about WOL. PR: 251531, 251540 PR: 158734, 109980 are broken again Reported by: jhb, emaste, jtl, Helge Oldach<freebsd_oldach.net> Martin Birgmeier <d8zNeCFG_aon.at> Discussion at: https://reviews.freebsd.org/D27459 Changes: _U stable/12/ stable/12/libexec/rc/rc.d/netif