Skip to content

Commit

Permalink
region: vpcs_mapped_address: alloc guestnic mapped addr backwards
Browse files Browse the repository at this point in the history
  • Loading branch information
yousong committed Apr 26, 2020
1 parent 64f269a commit 138b596
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/compute/models/vpcs_mapped_address.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func (man *SGuestnetworkManager) allocMappedIpAddr_(ctx context.Context) (string

sip := api.VpcMappedIPStart()
eip := api.VpcMappedIPEnd()
for i := sip; i <= eip; i++ {
for i := eip; i >= sip; i-- {
s := i.String()
if !utils.IsInStringArray(s, used) {
return s, nil
Expand Down

0 comments on commit 138b596

Please sign in to comment.