summaryrefslogtreecommitdiffhomepage
path: root/runsc/boot
diff options
context:
space:
mode:
authorFabricio Voznika <fvoznika@google.com>2018-08-08 22:38:41 -0700
committerShentubot <shentubot@google.com>2018-08-08 22:39:58 -0700
commit4e171f7590284c1f4cedf90c92204873961b2e97 (patch)
tree98fef86694288ce258985ce7ff4772ee23566874 /runsc/boot
parent48b5b35b2bd46ecd043f95d5f470da71046af760 (diff)
Basic support for ip link/addr and ifconfig
Closes #94 PiperOrigin-RevId: 207997580 Change-Id: I19b426f1586b5ec12f8b0cd5884d5b401d334924
Diffstat (limited to 'runsc/boot')
-rw-r--r--runsc/boot/network.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/runsc/boot/network.go b/runsc/boot/network.go
index d702ae74e..0e43c91be 100644
--- a/runsc/boot/network.go
+++ b/runsc/boot/network.go
@@ -133,15 +133,16 @@ func (n *Network) CreateLinksAndRoutes(args *CreateLinksAndRoutesArgs, _ *struct
return fmt.Errorf("failed to dup FD %v: %v", oldFD, err)
}
+ mac := tcpip.LinkAddress(generateRndMac())
linkEP := fdbased.New(&fdbased.Options{
FD: newFD,
MTU: uint32(link.MTU),
EthernetHeader: true,
HandleLocal: true,
- Address: tcpip.LinkAddress(generateRndMac()),
+ Address: mac,
})
- log.Infof("Enabling interface %q with id %d on addresses %+v", link.Name, nicID, link.Addresses)
+ log.Infof("Enabling interface %q with id %d on addresses %+v (%v)", link.Name, nicID, link.Addresses, mac)
if err := n.createNICWithAddrs(nicID, link.Name, linkEP, link.Addresses); err != nil {
return err
}