File tree Expand file tree Collapse file tree
Source/NETworkManager/ViewModels Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -180,7 +180,7 @@ public ICommand CalculateIPv4SubnetCommand
180180 private void CalculateIPv4SubnetAction ( )
181181 {
182182 IsDetailsVisible = false ;
183-
183+
184184 IPNetwork network = IPNetwork . Parse ( Subnet ) ;
185185
186186 NetworkAddress = network . Network ;
@@ -190,7 +190,8 @@ private void CalculateIPv4SubnetAction()
190190 IPAddresses = network . Total ;
191191 FirstIPAddress = network . FirstUsable ;
192192 LastIPAddress = network . LastUsable ;
193- Hosts = CIDR == 32 ? 0 : network . Total - 2 ;
193+ Hosts = ( ( network . AddressFamily == System . Net . Sockets . AddressFamily . InterNetwork && CIDR == 32 ) || ( network . AddressFamily == System . Net . Sockets . AddressFamily . InterNetworkV6 && CIDR == 128 ) ) ? 0 : network . Total - 2 ;
194+
194195
195196 IsDetailsVisible = true ;
196197
You can’t perform that action at this time.
0 commit comments