Use net.HardwareAddr for FDBasedLink.LinkAddress

It prints formatted to the log.

PiperOrigin-RevId: 252699551
This commit is contained in:
Fabricio Voznika
2019-06-11 14:31:46 -07:00
committed by Shentubot
parent a775ae82fe
commit 847c4b9759
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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.
+1 -1
View File
@@ -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.