]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix bug in ifconfig preventing proper VLAN creation.
authorHans Petter Selasky <hselasky@FreeBSD.org>
Thu, 10 Dec 2020 09:30:09 +0000 (09:30 +0000)
committerHans Petter Selasky <hselasky@FreeBSD.org>
Thu, 10 Dec 2020 09:30:09 +0000 (09:30 +0000)
commite512dc11ed1de48637e755484bc8574606ac727b
tree62b6e276a605306b1ce423be09fa2bc19b351461
parent21ed1b7ad1836fe5339331c5dce8d1e8f1424d72
Fix bug in ifconfig preventing proper 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 worked previously, because the data pointed to by the
ifr_data pointer was not parsed by the VLAN create ioctl(2). This is a
regression after r368229, because the VLAN creation now parses the
ifr_data field.

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

This is a direct commit, until r366917, stacked VLANs has been MFC'ed.

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