Fix unknown device type for mobile modems (ppp)

This commit is contained in:
zbchristian 2021-04-23 18:04:11 +02:00 committed by GitHub
parent e4995314f0
commit 422ce9dd3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -184,7 +184,7 @@ function getClientType($dev) {
$type=preg_only_match("/DEVTYPE=(\w*)/i",$udevadm);
}
}
if (empty($type) || array_search($type, $_SESSION["net-device-name-prefix"]) === false) {
if (empty($type) || $type == "none" || array_search($type, $_SESSION["net-device-name-prefix"]) === false) {
// no device type yet -> get device type from device name
if (preg_match("/^(\w+)[0-9]$/",$dev,$nam) === 1) $nam=$nam[1];
else $nam="none";