Skip to content

Commit 95028ce

Browse files
committed
fix: fix regex to get vfs details properly
Fixes #29 Signed-off-by: Łukasz Kleina <[email protected]>
1 parent 9c13b17 commit 95028ce

File tree

1 file changed

+1
-1
lines changed
  • mfd_network_adapter/network_interface/feature/virtualization

1 file changed

+1
-1
lines changed

mfd_network_adapter/network_interface/feature/virtualization/linux.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def _get_vfs_details(self) -> List[VFDetail]:
5353

5454
command = f"ip link show dev {self._interface().name}"
5555
pattern = (
56-
r"vf\s*(?P<vf_id>\d+)\s*link/ether\s*(?P<mac_address>[0-9a-fA-F]{2}(?::[0-9a-fA-F]{2}){5})\s*.*?,"
56+
r"vf\s*(?P<vf_id>\d+)\s*(link/ether|MAC)\s*(?P<mac_address>[0-9a-fA-F]{2}(?::[0-9a-fA-F]{2}){5})\s*.*?,"
5757
r"\s*spoof checking\s*(?P<spoofchk>\w+),\s*link-state\s*(?P<link_state>\w+),\s*trust\s*("
5858
r"?P<trust>\w+)"
5959
)

0 commit comments

Comments
 (0)