Skip to content

Commit a93599b

Browse files
author
freddy77
authored
Merge pull request #129 from freddy77/usbnet
CA-389988: Do not consider USB network cards not named ethX
2 parents 6a5589b + c000ee6 commit a93599b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

xcp/net/biosdevname.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def all_devices_all_names():
7575
continue
7676

7777
# Treat USB devices the PCI device of their host adapter
78-
if dinfo.get("Bus Info", "").startswith("usb-"):
78+
if dinfo.get("Bus Info", "").startswith("usb-") and "eth" in dinfo["Kernel name"]:
7979
dinfo["Bus Info"] = dinfo["Bus Info"].split('-')[1]
8080

8181
kname = dinfo["Kernel name"]

0 commit comments

Comments
 (0)