kern/105925: Regression in ifconfig(8) + vlan(4)

Yar Tikhiy yar at
Sat Jun 2 15:50:07 UTC 2007

The following reply was made to PR kern/105925; it has been noted by GNATS.

From: Yar Tikhiy <yar at>
To: bug-followup at
Subject: Re: kern/105925: Regression in ifconfig(8) + vlan(4)
Date: Sat, 2 Jun 2007 19:43:42 +0400

 It appears that this problem is not limited to vlan(4), any cloned
 interface can suffer from it.  The cause of the problem hides in
 rev. 1.2 of sbin/ifconfig/ifclone.c.  Due to that change, interface
 creation is handled now by a callback, which is invoked after all
 parameters were processed.  E.g., if one writes "ifconfig lo5 create
 mtu 1500 up", ifconfig will try to set the mtu and flags from the
 main command loop and fail before the create callback has a chance
 to bring the interface into existence.
 A possible workaround for vlan(4) is to avoid such parameters as
 "mtu" or "up" in "ifconfig vlanX create ...".  The "vlan" and
 "vlandev" parameters are processed from a callback, too, so they
 don't fail.  I.e., the following command will work:
 ifconfig vlan55 create vlan 55 vlandev em0
 Note that you don't need an explicit "up" as long as an IP address
 is assigned to the interface -- the IP layer will bring it up anyway.

More information about the freebsd-bugs mailing list