Skip to content

Commit c000ee6

Browse files
author
Frediano Ziglio
committed
CA-389988: Do not consider USB network cards not named ethX
USB network cards are assigned names using various rules. They can be usbX, ethX, wanX or wwanX based on different features. Our interface rename code bails out if the name is not in ethX format so ignore them. Signed-off-by: Frediano Ziglio <frediano.ziglio@cloud.com>
1 parent 6a5589b commit c000ee6

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)