Skip to content

Commit

Permalink
Enabled to set perform snat to always when PrivateRange is set to 255…
Browse files Browse the repository at this point in the history
….255.255.255/32
  • Loading branch information
Gizachew Eshetie committed Dec 21, 2022
1 parent cb7ad31 commit 87431a6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/Network/Network/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
--->

## Upcoming Release
* Fixed a bug that does not enable to set Perform SNAT to Always
* Fixed a bug that added Ddos related properties when viewing PublicIpAddress and DdosProtectionPlan objects

## Version 5.2.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ private void ValidateMaskedIpAddress(string ipAddress)
var splittedIp = split[0].Split('.');
var ip = Int32.Parse(splittedIp[0]) << 24;
ip += (Int32.Parse(splittedIp[1]) << 16) + (Int32.Parse(splittedIp[2]) << 8) + Int32.Parse(splittedIp[3]);
if (ip << bit != 0)
if ((ip << bit != 0) && (ip << bit != -1))
throw new AzPSArgumentException(String.Format(Resources.InvalidPrivateIPRangeUnmaskedBits, ipAddress), nameof(ipAddress), ErrorKind.UserError);
}

Expand Down

0 comments on commit 87431a6

Please sign in to comment.