Fixed virtual network cards creation #208

Merged
geektophe merged 1 commit from fix/chriss/virtual_network_nic_mac_addr into master 2022-03-08 17:31:26 +01:00
geektophe commented 2022-03-08 17:27:47 +01:00 (Migrated from github.com)

This patch fixes a mismatch between the way network interfaces are looked for from network cards, and the way they are created:

  • If a network card has a NAC address, it used in the search criteria to
    find the network interface
  • When creating virtual interfaces, the MAC address is not specified in
    the creation parameters

This raises an exception when a virtual card has a MAC address:

  • The virtual interface has been created without MAC address
  • But the network card has one, so the interface is looked for using it
  • The network interface is not found, so it's created
  • An error is risen because an interface with the same name already
    exists

This patch sets the MAC address on the interface if it exists, no matter if it is virtual or not.

This patch fixes a mismatch between the way network interfaces are looked for from network cards, and the way they are created: - If a network card has a NAC address, it used in the search criteria to find the network interface - When creating virtual interfaces, the MAC address is not specified in the creation parameters This raises an exception when a virtual card has a MAC address: - The virtual interface has been created without MAC address - But the network card has one, so the interface is looked for using it - The network interface is not found, so it's created - An error is risen because an interface with the same name already exists This patch sets the MAC address on the interface if it exists, no matter if it is virtual or not.
cyrinux (Migrated from github.com) approved these changes 2022-03-08 17:29:54 +01:00
Sign in to join this conversation.
No description provided.