]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix bug in ifconfig preventing proper VLAN creation.
authorHans Petter Selasky <hselasky@FreeBSD.org>
Wed, 9 Dec 2020 20:13:12 +0000 (20:13 +0000)
committerHans Petter Selasky <hselasky@FreeBSD.org>
Wed, 9 Dec 2020 20:13:12 +0000 (20:13 +0000)
commit21f5dc86d356acdf4ce173f19f46edc5dbb00f01
tree67b34c36cd8269fc26e6125252e36797ff3844f7
parentee47a12a490f89226ae736f92d8578ec1ca3b157
Fix bug in ifconfig preventing proper VLAN creation.

Detection of interface type by filter 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 date pointed to by the
ifr_data pointer was not parsed by 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

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