From 847c4b9759c49cb30728579cfb0f4a69f1987b94 Mon Sep 17 00:00:00 2001 From: Fabricio Voznika Date: Tue, 11 Jun 2019 14:30:34 -0700 Subject: Use net.HardwareAddr for FDBasedLink.LinkAddress It prints formatted to the log. PiperOrigin-RevId: 252699551 --- runsc/boot/network.go | 2 +- runsc/sandbox/network.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/runsc/boot/network.go b/runsc/boot/network.go index 82c259f47..d86803252 100644 --- a/runsc/boot/network.go +++ b/runsc/boot/network.go @@ -56,7 +56,7 @@ type FDBasedLink struct { Addresses []net.IP Routes []Route GSOMaxSize uint32 - LinkAddress []byte + LinkAddress net.HardwareAddr // NumChannels controls how many underlying FD's are to be used to // create this endpoint. diff --git a/runsc/sandbox/network.go b/runsc/sandbox/network.go index 1fd091514..e9e24fc58 100644 --- a/runsc/sandbox/network.go +++ b/runsc/sandbox/network.go @@ -228,7 +228,7 @@ func createInterfacesAndRoutesFromNS(conn *urpc.Client, nsPath string, enableGSO if err != nil { return fmt.Errorf("getting link for interface %q: %v", iface.Name, err) } - link.LinkAddress = []byte(ifaceLink.Attrs().HardwareAddr) + link.LinkAddress = ifaceLink.Attrs().HardwareAddr log.Debugf("Setting up network channels") // Create the socket for the device. -- cgit v1.2.3