Bug 137641 - ifconfig(8): various problems with "vlan_device.vlan_id" syntax
Summary: ifconfig(8): various problems with "vlan_device.vlan_id" syntax
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 7.2-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-10 14:50 UTC by Vladimir Shebaldenkov
Modified: 2018-01-03 05:13 UTC (History)
0 users

See Also:


Attachments
device.vlan_id.patch.txt (451 bytes, text/plain; charset=US-ASCII)
2009-08-10 19:33 UTC, Artis Caune
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Shebaldenkov 2009-08-10 14:50:00 UTC
"Since FreeBSD 5.3 a vlan device can be created and configured with one command:
ifconfig vlan_device.vlan_id create"

Quote from here - http://people.freebsd.org/~arved/vlan/vlan_en.html

This is so, but have some problems with ifconfig and rc scripts. 
1. ifconfig does not load if_vlan.ko automatically, when using this syntax. Need  to add if_vlan_load="YES" into loader.conf
2. /etc/rc.d/netif has a similar with this syntax problem also.
And may be similar errors in other places.

In rc.conf something like this:
cloned_interfaces="xl0.101 xl0.102"
ifconfig_xl0_101="inet 10.10.10.1/30"
ifconfig_xl0_102="inet 10.10.10.5/30"

How-To-Repeat: # kldstat
Id Refs Address    Size     Name
 1    7 0xc0400000 9fab28   kernel

# ifconfig vlan101 create
# kldstat
Id Refs Address    Size     Name
 1    9 0xc0400000 9fab28   kernel
 8    1 0xc4329000 5000     if_vlan.ko

# kldunload if_vlan
# ifconfig xl0.101 create
ifconfig: SIOCIFCREATE2: Invalid argument

# kldload if_vlan
# ifconfig xl0.101 create

-----------------------

# kldunload if_vlan
# /etc/rc.d/netif restart
Stopping network: lo0 xl0.
ifconfig: SIOCIFCREATE2: Invalid argument
ifconfig: SIOCIFCREATE2: Invalid argument
..
# kldload if_vlan
# /etc/rc.d/netif restart
Stopping network: lo0 xl0.
showstat_xl0.101=1: not found
showstat_xl0.102=1: not found
..
# /etc/rc.d/netif restart
Stopping network:showstat_xl0.101=1: not found
showstat_xl0.102=1: not found
 lo0 xl0 xl0.101 xl0.102.
ifconfig: SIOCIFCREATE2: File exists
ifconfig: SIOCIFCREATE2: File exists
showstat_xl0.101=1: not found
showstat_xl0.102=1: not found
..
Comment 1 Remko Lodder freebsd_committer freebsd_triage 2009-08-10 16:36:01 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-net

reassign to networking team
Comment 2 Artis Caune 2009-08-10 19:33:20 UTC
Hi,

attached patch should fix automatic loading of if_vlan when creating
interface as device.vlan_id and vlan module is not loaded.




-- 
Artis Caune

    Everything should be made as simple as possible, but not simpler.
Comment 3 Garrett Cooper 2012-08-17 21:07:45 UTC
    I noticed this in 7.3-RELEASE as well; it has been fixed in
7.4-RELEASE/9.0-RELEASE (probably an rc bug, not a vlan(4) bug
specifically), so I would close this PR.
Thanks!
-Garrett
Comment 4 Garrett Cooper 2012-08-17 21:53:55 UTC
On Fri, Aug 17, 2012 at 1:07 PM, Garrett Cooper <yanegomi@gmail.com> wrote:
>     I noticed this in 7.3-RELEASE as well; it has been fixed in
> 7.4-RELEASE/9.0-RELEASE (probably an rc bug, not a vlan(4) bug
> specifically), so I would close this PR.

    I stand partly corrected:

# uname -a
FreeBSD  7.4-RELEASE-p10 FreeBSD 7.4-RELEASE-p10 #0: Fri Aug 17
07:15:01 UTC 2012
root@:/usr/obj/mnt/freebsd/releng/7.4/sys/ISI-GENERIC  amd64
# service netif stop cxgb0.190
Stopping network:showstat_cxgb0.190=1: not found
 cxgb0.190.

    There are probably more rc bugs that maybe need to be dealt with
on 7.x that people probably don't care about at this point in the
maintenance cycle.
Thanks!
-Garrett
Comment 5 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:00:28 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped