fix(win-bridge): panic while calling HNS api
Signed-off-by: thxcode <thxcode0824@gmail.com>
This commit is contained in:
parent
47927f5084
commit
178d7c0934
@ -112,10 +112,11 @@ func cmdHnsAdd(args *skel.CmdArgs, n *NetConf) (*current.Result, error) {
|
||||
epName := hns.ConstructEndpointName(args.ContainerID, args.Netns, n.Name)
|
||||
hnsEndpoint, err := hns.ProvisionEndpoint(epName, hnsNetwork.Id, args.ContainerID, args.Netns, func() (*hcsshim.HNSEndpoint, error) {
|
||||
epInfo, err := ProcessEndpointArgs(args, n)
|
||||
epInfo.NetworkId = hnsNetwork.Id
|
||||
if err != nil {
|
||||
return nil, errors.Annotatef(err, "error while ProcessEndpointArgs")
|
||||
}
|
||||
epInfo.NetworkId = hnsNetwork.Id
|
||||
|
||||
hnsEndpoint, err := hns.GenerateHnsEndpoint(epInfo, &n.NetConf)
|
||||
if err != nil {
|
||||
return nil, errors.Annotatef(err, "error while GenerateHnsEndpoint")
|
||||
|
Loading…
x
Reference in New Issue
Block a user