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 Jan 13, 2023
1 parent c5b7bf0 commit a5d75a9
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 the incorrect type of `-TotalBytesPerSession` in `New-AzNetworkWatcherPacketCapture`

## Version 5.3.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 a5d75a9

Please sign in to comment.