diff options
author | Fabricio Voznika <fvoznika@google.com> | 2019-04-17 11:14:24 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2019-04-17 11:16:35 -0700 |
commit | 9f8c89fc7fb7c4588713eb376fa56c4c3026d43c (patch) | |
tree | afa9bea24c4c4685d16e6ef3cb432e9b3ac425ae /runsc | |
parent | e8156667179c52c40f54affc085009258ae11092 (diff) |
Return error from fdbased.New
RELNOTES: n/a
PiperOrigin-RevId: 244031742
Change-Id: Id0cdb73194018fb5979e67b58510ead19b5a2b81
Diffstat (limited to 'runsc')
-rw-r--r-- | runsc/boot/network.go | 5 |
1 files changed, 4 insertions, 1 deletions
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 { |