HomeFreeBSD

Fix bug in ifconfig regarding VLAN creation.

Description

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:

  1. ifconfig lagg0 create
  2. 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

Details

Provenance
hselaskyAuthored on
Differential Revision
D27521: Fix bug in ifconfig preventing proper vlan creation
Parents
rS368504: Fix bug in ifconfig regarding VLAN creation.
Branches
Unknown
Tags
Unknown