mirror of
https://github.com/aljazceru/kata-containers.git
synced 2026-01-19 22:34:28 +01:00
network: Fix error message for setting hardware address on TAP interface
Error out with the correct interface name and hardware address instead. Fixes: #4944 Signed-off-by: Hengqi Chen <chenhengqi@outlook.com>
This commit is contained in:
@@ -708,8 +708,8 @@ func tapNetworkPair(ctx context.Context, endpoint Endpoint, queues int, disableV
|
||||
}
|
||||
|
||||
if err := netHandle.LinkSetHardwareAddr(tapLink, tapHardAddr); err != nil {
|
||||
return fmt.Errorf("Could not set MAC address %s for veth interface %s: %s",
|
||||
netPair.VirtIface.HardAddr, netPair.VirtIface.Name, err)
|
||||
return fmt.Errorf("Could not set MAC address %s for TAP interface %s: %s",
|
||||
netPair.TAPIface.HardAddr, netPair.TAPIface.Name, err)
|
||||
}
|
||||
|
||||
if err := netHandle.LinkSetUp(tapLink); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user