summaryrefslogtreecommitdiffhomepage
path: root/runsc/boot/network.go
diff options
context:
space:
mode:
Diffstat (limited to 'runsc/boot/network.go')
-rw-r--r--runsc/boot/network.go13
1 files changed, 8 insertions, 5 deletions
diff --git a/runsc/boot/network.go b/runsc/boot/network.go
index 2257ecca7..9fb3ebd95 100644
--- a/runsc/boot/network.go
+++ b/runsc/boot/network.go
@@ -282,12 +282,15 @@ func (n *Network) createNICWithAddrs(id tcpip.NICID, name string, ep stack.LinkE
for _, addr := range addrs {
proto, tcpipAddr := ipToAddressAndProto(addr.Address)
- ap := tcpip.AddressWithPrefix{
- Address: tcpipAddr,
- PrefixLen: addr.PrefixLen,
+ protocolAddr := tcpip.ProtocolAddress{
+ Protocol: proto,
+ AddressWithPrefix: tcpip.AddressWithPrefix{
+ Address: tcpipAddr,
+ PrefixLen: addr.PrefixLen,
+ },
}
- if err := n.Stack.AddAddressWithPrefix(id, proto, ap); err != nil {
- return fmt.Errorf("AddAddress(%v, %v, %v) failed: %v", id, proto, tcpipAddr, err)
+ if err := n.Stack.AddProtocolAddress(id, protocolAddr, stack.AddressProperties{}); err != nil {
+ return fmt.Errorf("AddProtocolAddress(%d, %+v, {}) failed: %s", id, protocolAddr, err)
}
}
return nil