update vendor
This commit is contained in:
19
vendor/github.com/docker/libnetwork/ipvs/netlink.go
generated
vendored
19
vendor/github.com/docker/libnetwork/ipvs/netlink.go
generated
vendored
@@ -100,7 +100,7 @@ func fillService(s *Service) nl.NetlinkRequestData {
|
||||
return cmdAttr
|
||||
}
|
||||
|
||||
func fillDestinaton(d *Destination) nl.NetlinkRequestData {
|
||||
func fillDestination(d *Destination) nl.NetlinkRequestData {
|
||||
cmdAttr := nl.NewRtAttr(ipvsCmdAttrDest, nil)
|
||||
|
||||
nl.NewRtAttrChild(cmdAttr, ipvsDestAttrAddress, rawIPData(d.Address))
|
||||
@@ -134,7 +134,7 @@ func (i *Handle) doCmdwithResponse(s *Service, d *Destination, cmd uint8) ([][]b
|
||||
}
|
||||
|
||||
} else {
|
||||
req.AddData(fillDestinaton(d))
|
||||
req.AddData(fillDestination(d))
|
||||
}
|
||||
|
||||
res, err := execute(i.sock, req, 0)
|
||||
@@ -203,10 +203,6 @@ func newGenlRequest(familyID int, cmd uint8) *nl.NetlinkRequest {
|
||||
}
|
||||
|
||||
func execute(s *nl.NetlinkSocket, req *nl.NetlinkRequest, resType uint16) ([][]byte, error) {
|
||||
var (
|
||||
err error
|
||||
)
|
||||
|
||||
if err := s.Send(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -222,6 +218,13 @@ done:
|
||||
for {
|
||||
msgs, err := s.Receive()
|
||||
if err != nil {
|
||||
if s.GetFd() == -1 {
|
||||
return nil, fmt.Errorf("Socket got closed on receive")
|
||||
}
|
||||
if err == syscall.EAGAIN {
|
||||
// timeout fired
|
||||
continue
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
for _, m := range msgs {
|
||||
@@ -436,6 +439,10 @@ func assembleDestination(attrs []syscall.NetlinkRouteAttr) (*Destination, error)
|
||||
d.LowerThreshold = native.Uint32(attr.Value)
|
||||
case ipvsDestAttrAddressFamily:
|
||||
d.AddressFamily = native.Uint16(attr.Value)
|
||||
case ipvsDestAttrActiveConnections:
|
||||
d.ActiveConnections = int(native.Uint16(attr.Value))
|
||||
case ipvsDestAttrInactiveConnections:
|
||||
d.InactiveConnections = int(native.Uint16(attr.Value))
|
||||
}
|
||||
}
|
||||
return &d, nil
|
||||
|
Reference in New Issue
Block a user