From 9f8c89fc7fb7c4588713eb376fa56c4c3026d43c Mon Sep 17 00:00:00 2001 From: Fabricio Voznika Date: Wed, 17 Apr 2019 11:14:24 -0700 Subject: Return error from fdbased.New RELNOTES: n/a PiperOrigin-RevId: 244031742 Change-Id: Id0cdb73194018fb5979e67b58510ead19b5a2b81 --- runsc/boot/network.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'runsc') diff --git a/runsc/boot/network.go b/runsc/boot/network.go index 3915a021f..ceb00a858 100644 --- a/runsc/boot/network.go +++ b/runsc/boot/network.go @@ -135,7 +135,7 @@ func (n *Network) CreateLinksAndRoutes(args *CreateLinksAndRoutesArgs, _ *struct } mac := tcpip.LinkAddress(generateRndMac()) - linkEP := fdbased.New(&fdbased.Options{ + linkEP, err := fdbased.New(&fdbased.Options{ FD: newFD, MTU: uint32(link.MTU), EthernetHeader: true, @@ -144,6 +144,9 @@ func (n *Network) CreateLinksAndRoutes(args *CreateLinksAndRoutesArgs, _ *struct GSOMaxSize: link.GSOMaxSize, RXChecksumOffload: true, }) + if err != nil { + return err + } 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, false /* loopback */); err != nil { -- cgit v1.2.3