From eee971689c970164f24a95087e4d80f5401cc9b7 Mon Sep 17 00:00:00 2001 From: Joe Gillotti Date: Wed, 7 Apr 2021 21:25:27 -0700 Subject: [PATCH] Linux: support getting the type of more kinds of network interfaces In this case, make vlan tagged interfaces go from "N/A" to "Vlan" --- src/Linfo/OS/Linux.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Linfo/OS/Linux.php b/src/Linfo/OS/Linux.php index e2bc522..fac7ce5 100644 --- a/src/Linfo/OS/Linux.php +++ b/src/Linfo/OS/Linux.php @@ -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