]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
Fix bug in ifconfig regarding VLAN creation.
authorhselasky <hselasky@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 10 Dec 2020 09:39:27 +0000 (09:39 +0000)
committerhselasky <hselasky@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 10 Dec 2020 09:39:27 +0000 (09:39 +0000)
commit081d4c620cf0be4ae008242bd81792170cc25dbb
treed75a72b5518a6f17dc5deb184e9ac86c19ff290c
parent883ec1954986157ebd3119f2dd63dadfc8017b2c
Fix bug in ifconfig regarding VLAN creation.

Detection of VLAN interface type must happen before detection of
interface type by prefix. Else the following sequence of commands will
try to create a LAGG interface instead of a VLAN interface, which
accidentially works, because the data pointed to by the ifr_data
pointer is not parsed by the VLAN create ioctl(2).

How to reproduce:
# ifconfig lagg0 create
# ifconfig lagg0.256 create

This is a direct commit.

Differential Revision: https://reviews.freebsd.org/D27521
Tested by: raul.munoz@custos.es
Sponsored by: Mellanox Technologies // NVIDIA Networking

git-svn-id: svn://svn.freebsd.org/base/stable/10@368505 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sbin/ifconfig/ifclone.c