New fixes around private IP addresses in Virtualization controller.
This commit is contained in:
parent
2d9e1c17c2
commit
f376bf7bd5
2 changed files with 5 additions and 3 deletions
|
@ -182,7 +182,7 @@ namespace WebsitePanel.EnterpriseServer {
|
|||
}
|
||||
public static IPAddress operator &(IPAddress a, IPAddress b) {
|
||||
if (a.V6 != b.V6) throw new ArgumentException("Arithmetic with mixed v4 & v6 addresses not supported.");
|
||||
return new IPAddress { Address = a.Address | b.Address, Cidr = a.V4 ? 32 : 128, Null = false, V6 = a.V6, IsSubnet = false };
|
||||
return new IPAddress { Address = a.Address & b.Address, Cidr = a.V4 ? 32 : 128, Null = false, V6 = a.V6, IsSubnet = false };
|
||||
}
|
||||
public static IPAddress operator ~(IPAddress a) {
|
||||
if (a.Null) return new IPAddress { Address = 0, Null = true, Cidr = a.V4 ? 32 : 128, V6 = true, IsSubnet = false };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue