Fixed "Arithmetic overflow" in VirtualizationServerController.GetSubnetMaskCidr method.
This commit is contained in:
parent
0709f04339
commit
d8a76e9484
2 changed files with 3 additions and 3 deletions
|
@ -3266,7 +3266,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
var ip = IPAddress.Parse(subnetMask);
|
var ip = IPAddress.Parse(subnetMask);
|
||||||
if (ip.V4) {
|
if (ip.V4) {
|
||||||
int cidr = 32;
|
int cidr = 32;
|
||||||
long mask = (long)ip.Address;
|
var mask = ip.Address;
|
||||||
while ((mask & 1) == 0 && cidr > 0) {
|
while ((mask & 1) == 0 && cidr > 0) {
|
||||||
mask >>= 1;
|
mask >>= 1;
|
||||||
cidr -= 1;
|
cidr -= 1;
|
||||||
|
|
|
@ -5,11 +5,11 @@
|
||||||
</configSections>
|
</configSections>
|
||||||
<!-- Connection strings -->
|
<!-- Connection strings -->
|
||||||
<connectionStrings>
|
<connectionStrings>
|
||||||
<add name="EnterpriseServer" connectionString="server=HSTPROV01;database=WebsitePanelMerge;uid=WebsitePanel;pwd=aj7ep6fyhmw3b5qeth7c;" providerName="System.Data.SqlClient" />
|
<add name="EnterpriseServer" connectionString="server=(local)\SQLEXPRESS;database=WebsitePanel_dev;uid=sa;pwd=Password12" providerName="System.Data.SqlClient" />
|
||||||
</connectionStrings>
|
</connectionStrings>
|
||||||
<appSettings>
|
<appSettings>
|
||||||
<!-- Encryption util settings -->
|
<!-- Encryption util settings -->
|
||||||
<add key="WebsitePanel.CryptoKey" value="3x7eqt7zabc5n5afs6dg" />
|
<add key="WebsitePanel.CryptoKey" value="1234567890" />
|
||||||
<!-- A1D4KDHUE83NKHddF -->
|
<!-- A1D4KDHUE83NKHddF -->
|
||||||
<add key="WebsitePanel.EncryptionEnabled" value="true" />
|
<add key="WebsitePanel.EncryptionEnabled" value="true" />
|
||||||
<!-- Web Applications -->
|
<!-- Web Applications -->
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue