Skip to content

Commit a5d75a9

Browse files
author
Gizachew Eshetie
committed
Enabled to set perform snat to always when PrivateRange is set to 255.255.255.255/32
1 parent c5b7bf0 commit a5d75a9

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/Network/Network/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
--->
2020

2121
## Upcoming Release
22+
* Fixed a bug that does not enable to set Perform SNAT to Always
2223
* Fixed the incorrect type of `-TotalBytesPerSession` in `New-AzNetworkWatcherPacketCapture`
2324

2425
## Version 5.3.0

src/Network/Network/Models/AzureFirewallPolicy/PSAzureFirewallPolicy.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ private void ValidateMaskedIpAddress(string ipAddress)
122122
var splittedIp = split[0].Split('.');
123123
var ip = Int32.Parse(splittedIp[0]) << 24;
124124
ip += (Int32.Parse(splittedIp[1]) << 16) + (Int32.Parse(splittedIp[2]) << 8) + Int32.Parse(splittedIp[3]);
125-
if (ip << bit != 0)
125+
if ((ip << bit != 0) && (ip << bit != -1))
126126
throw new AzPSArgumentException(String.Format(Resources.InvalidPrivateIPRangeUnmaskedBits, ipAddress), nameof(ipAddress), ErrorKind.UserError);
127127
}
128128

0 commit comments

Comments
 (0)