Bug 109980 - /etc/rc.d/netif restart doesn't destroy cloned_interfaces
Summary: /etc/rc.d/netif restart doesn't destroy cloned_interfaces
Status: Closed DUPLICATE of bug 158734
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: 6.2-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: Cy Schubert
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-06 11:30 UTC by Marat N.Afanasyev
Modified: 2020-10-19 20:38 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marat N.Afanasyev 2007-03-06 11:30:03 UTC
	/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.
Comment 1 Brooks Davis freebsd_committer 2007-03-07 20:42:06 UTC
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
Comment 2 Marat N.Afanasyev 2007-03-08 06:08:47 UTC
I think that if we create cloned interfaces at start, we should destroy 
them when shutting down.

-- 
SY, Marat
Comment 3 Yar Tikhiy freebsd_committer 2007-08-17 10:02:37 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-rc

Over to the rc list for consideration.
Comment 4 Chris Rees freebsd_committer 2012-10-30 14:47:58 UTC
State Changed
From-To: open->closed

From rc.d/netif, you can use clonedown and then cloneup to reset cloned 
interfaces.
Comment 5 Cy Schubert freebsd_committer 2020-10-12 05:10:27 UTC
This is not fixed. See PR/158734 for the patch.
Comment 6 Cy Schubert freebsd_committer 2020-10-12 05:12:20 UTC
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 ***
Comment 7 commit-hook freebsd_committer 2020-10-19 20:38:36 UTC
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