Skip to content

Commit

Permalink
CA-389988: Do not consider USB network cards not named ethX
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
freddy77 committed Mar 13, 2024
1 parent 6a5589b commit c000ee6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xcp/net/biosdevname.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down

0 comments on commit c000ee6

Please sign in to comment.