Skip to content

Commit

Permalink
Fix bugs in network setup introduced by a refactor PR (#1299)
Browse files Browse the repository at this point in the history
When consolidating guest protocol into its own package
in #1240 wrong constant
definition was used for adding a network namespace. Fix this by
using the correct constants.

Signed-off-by: Maksim An <[email protected]>
  • Loading branch information
anmaxvl authored Feb 15, 2022
1 parent 51f5ab8 commit 12b02a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions internal/uvm/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ func (uvm *UtilityVM) AddNetNS(ctx context.Context, hcnNamespace *hcn.HostComput
guestNamespace := hcsschema.ModifySettingRequest{
GuestRequest: guestrequest.ModificationRequest{
ResourceType: guestresource.ResourceTypeNetworkNamespace,
RequestType: guestrequest.RequestTypeRemove,
RequestType: guestrequest.RequestTypeAdd,
Settings: hcnNamespace,
},
}
Expand Down Expand Up @@ -686,7 +686,7 @@ func (uvm *UtilityVM) AddNICInGuest(ctx context.Context, cfg *guestresource.LCOW
request := hcsschema.ModifySettingRequest{}
request.GuestRequest = guestrequest.ModificationRequest{
ResourceType: guestresource.ResourceTypeNetwork,
RequestType: guestrequest.RequestTypePreAdd,
RequestType: guestrequest.RequestTypeAdd,
Settings: cfg,
}

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 12b02a1

Please sign in to comment.