fix ip allocation for /32 Addresses
authorgithub138 <m.ehinger@ltur.de>
Sat, 11 May 2013 10:36:21 +0000 (12:36 +0200)
committergithub138 <m.ehinger@ltur.de>
Sat, 11 May 2013 11:14:38 +0000 (13:14 +0200)
fix ip space creation for /32 Addresses

snmpgeneric.php

index 854d159bdce4c9e70d44dbc391ff015d876a2197..5f5bbf5379e4d0cb767ed5de8cd70309719b3de8 100644 (file)
@@ -1286,7 +1286,10 @@ function snmpgeneric_list($object_id) {
                        switch($addrtype) {
                                case 'ipv4':
                                case 'ipv4z':
-                                       $netid = getIPv4AddressNetworkId(ip_parse($ipaddr));
+                                       if($maskbits == 32)
+                                               $netid = 'host';
+                                       else
+                                               $netid = getIPv4AddressNetworkId(ip_parse($ipaddr));
                                        break;
 
                                case 'ipv6':
@@ -1484,6 +1487,9 @@ function snmpgeneric_list($object_id) {
                                switch($addrtype) {
                                        case 'ipv4z':
                                        case 'ipv4':
+                                               if($maskbits == 32)
+                                                       $bcast = "host";
+
                                                $inputname = 'ip';
                                                break;