Skip to content

Commit

Permalink
Linux: support getting the type of more kinds of network interfaces
Browse files Browse the repository at this point in the history
In this case, make vlan tagged interfaces go from "N/A" to "Vlan"
  • Loading branch information
jrgp committed Apr 8, 2021
1 parent 45381d9 commit eee9716
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Linfo/OS/Linux.php
Original file line number Diff line number Diff line change
Expand Up @@ -959,6 +959,8 @@ public function getNet()
$type = 'Bridge';
} elseif (is_dir($path.'/bonding')) {
$type = 'Bond';
} elseif(($uevent_contents = @parse_ini_file($path.'/uevent')) && isset($uevent_contents['DEVTYPE'])) {
$type = ucfirst($uevent_contents['DEVTYPE']);
}

// TODO find some way of finding out what provides the virt-specific kvm vnet devices
Expand Down

0 comments on commit eee9716

Please sign in to comment.