Skip to content

Commit

Permalink
fix(win-bridge): panic while calling HNS api
Browse files Browse the repository at this point in the history
Signed-off-by: thxcode <[email protected]>
  • Loading branch information
thxCode committed Feb 26, 2021
1 parent 47927f5 commit 178d7c0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugins/main/windows/win-bridge/win-bridge_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 178d7c0

Please sign in to comment.