public inbox for developer@lists.illumos.org (since 2011-08)
 help / color / mirror / Atom feed
* [illumos gate - Bug #16777] dladm show-vnic, vlan, and etherstub class confusion
       [not found] <redmine.issue-16777.20240913054337.1572@illumos.org>
@ 2024-09-13 20:14 ` illumos project
  0 siblings, 0 replies; only message in thread
From: illumos project @ 2024-09-13 20:14 UTC (permalink / raw)


Issue #16777 has been updated by Dan McDonald.


It might not be clear from the description, but this problem affects `show-vnic/vlan` if and only if you specify the non-vnic object name.  Here's an example transcript to clarify things.

<pre>
[root@smartos-bios ~]# dladm show-link
LINK        CLASS     MTU    STATE    BRIDGE     OVER
e1000g0     phys      1500   up       --         --
[root@smartos-bios ~]# dladm create-vlan vlan11 -l e1000g0 -v 11
[root@smartos-bios ~]# dladm show-vlan
LINK            VID      OVER         FLAGS
vlan11          11       e1000g0      -----
[root@smartos-bios ~]# dladm show-vnic
[root@smartos-bios ~]# dladm show-vnic vlan11
LINK         OVER       SPEED    MACADDRESS        MACADDRTYPE VID  ZONE
vlan11       e1000g0    1000     0:c:29:39:8d:b    fixed       11   --
[root@smartos-bios ~]# dladm create-vnic vlan12 -l e1000g0 -v 12
[root@smartos-bios ~]# dladm show-vnic vlan11
LINK         OVER       SPEED    MACADDRESS        MACADDRTYPE VID  ZONE
vlan11       e1000g0    1000     0:c:29:39:8d:b    fixed       11   --
[root@smartos-bios ~]# dladm show-vnic
LINK         OVER       SPEED    MACADDRESS        MACADDRTYPE VID  ZONE
vlan12       e1000g0    1000     2:8:20:65:ef:e    random      12   --
[root@smartos-bios ~]# dladm show-vlan
LINK            VID      OVER         FLAGS
vlan11          11       e1000g0      -----
[root@smartos-bios ~]# dladm show-vlan vlan11
LINK            VID      OVER         FLAGS
vlan11          11       e1000g0      -----
[root@smartos-bios ~]# dladm show-vlan vlan12
LINK            VID      OVER         FLAGS
vlan12          12       e1000g0      -----
[root@smartos-bios ~]# dladm show-link
LINK        CLASS     MTU    STATE    BRIDGE     OVER
e1000g0     phys      1500   up       --         --
vlan11      vlan      1500   up       --         e1000g0
vlan12      vnic      1500   up       --         e1000g0
[root@smartos-bios ~]# dladm show-etherstub vlan11
[root@smartos-bios ~]# dladm show-etherstub vlan12
[root@smartos-bios ~]# 
</pre>

----------------------------------------
Bug #16777: dladm show-vnic, vlan, and etherstub class confusion
https://www.illumos.org/issues/16777#change-47143

* Author: Robert Mustacchi
* Status: New
* Priority: Normal
* Assignee: Robert Mustacchi
* Category: cmd - userland programs
* Difficulty: Medium
* Gerrit CR: 3687
----------------------------------------
A colleague hit a confusing case the other day where we had a system with a vlan interface; however running @dladm show-vnic@ on it surprisingly worked. For example:

<pre>
rm@raphael ~ $ pfexec dladm create-vlan -t -l igb1 -v 23 vlan23
rm@raphael ~ $ dladm show-link vlan23
LINK        CLASS     MTU    STATE    BRIDGE     OVER
vlan23      vlan      1500   up       --         igb1
rm@raphael ~ $ dladm show-vnic vlan23
LINK         OVER         SPEED    MACADDRESS        MACADDRTYPE         VID
vlan23       igb1         1000     9c:6b:0:55:76:28  fixed               23
rm@raphael ~ $ dladm show-vlan vlan23
LINK            VID      OVER         FLAGS
vlan23          23       igb1         -----
</pre>

The problem here is that a vlan device, vnic device, and even an etherstub all leverage the same internal kernel devices. Therefore when the @show-vnic@ logic calls into @dladm_vnic_info@, it ends up being able to continue, especially because the way that the check is phrased in @print_vnic()@ is that it looks for something that isn't actually an etherstub. The @VNIC_IOC_INFO@ will work on these which is why the above output is working. The fix here is to make sure that @dladm@ is actually checking for these arguments and erroring appropriately if not.



-- 
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: https://www.illumos.org/my/account

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-09-13 20:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <redmine.issue-16777.20240913054337.1572@illumos.org>
2024-09-13 20:14 ` [illumos gate - Bug #16777] dladm show-vnic, vlan, and etherstub class confusion illumos project

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).