From c000ee6220b89ef9e1b93b9770df4fd59eb84fa2 Mon Sep 17 00:00:00 2001 From: Frediano Ziglio Date: Wed, 13 Mar 2024 14:46:32 +0000 Subject: [PATCH] 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 --- xcp/net/biosdevname.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xcp/net/biosdevname.py b/xcp/net/biosdevname.py index 7099ca55..be12d814 100644 --- a/xcp/net/biosdevname.py +++ b/xcp/net/biosdevname.py @@ -75,7 +75,7 @@ def all_devices_all_names(): continue # Treat USB devices the PCI device of their host adapter - if dinfo.get("Bus Info", "").startswith("usb-"): + if dinfo.get("Bus Info", "").startswith("usb-") and "eth" in dinfo["Kernel name"]: dinfo["Bus Info"] = dinfo["Bus Info"].split('-')[1] kname = dinfo["Kernel name"]