|
4 | 4 | ACTION!="add", GOTO="vyos_net_end" |
5 | 5 | SUBSYSTEM!="net", GOTO="vyos_net_end" |
6 | 6 |
|
| 7 | +# Fallback path for Azure VF interfaces: if a VF still appears as plain ethN, |
| 8 | +# rename it to vf_ethX before persistent synthetic interface naming runs to |
| 9 | +# prevent it from incorrectly being considered as a synthetic interface. |
| 10 | +ATTR{[dmi/id]sys_vendor}=="Microsoft Corporation", DRIVERS=="mlx*_core", KERNEL=="eth*", PROGRAM="vyos_vf_name %k", NAME="%c", GOTO="vyos_net_end" |
| 11 | +ATTR{[dmi/id]sys_vendor}=="Microsoft Corporation", DRIVERS=="mana", KERNEL=="eth*", PROGRAM="vyos_vf_name %k", NAME="%c", GOTO="vyos_net_end" |
| 12 | + |
| 13 | +# VF interfaces are not handled by vyos_net_name, so skip them. |
| 14 | +# KERNEL=="vf_*" catches already-renamed Mellanox and MANA VFs. |
| 15 | +# DRIVERS=="mlx*_core" and DRIVERS=="mana" on Azure catch VF interfaces |
| 16 | +# in an unexpected intermediate state (still named ethN/eN) that must not |
| 17 | +# be remapped by vyos_net_name. |
| 18 | +# This guard is intentionally scoped to Microsoft Azure to |
| 19 | +# avoid excluding bare-metal Mellanox NICs on physical hardware, which do |
| 20 | +# need persistent naming via vyos_net_name. |
| 21 | +KERNEL=="vf_*", GOTO="vyos_net_end" |
| 22 | +ATTR{[dmi/id]sys_vendor}=="Microsoft Corporation", DRIVERS=="mlx*_core", GOTO="vyos_net_end" |
| 23 | +ATTR{[dmi/id]sys_vendor}=="Microsoft Corporation", DRIVERS=="mana", GOTO="vyos_net_end" |
| 24 | + |
7 | 25 | # Do name change for ethernet and wireless devices only |
8 | 26 | KERNEL!="eth*|wlan*|e*", GOTO="vyos_net_end" |
9 | 27 |
|
|
0 commit comments