View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
695 | RackTables | IPv4/IPv6/SLB | public | 2012-12-10 10:21 | 2012-12-17 07:01 |
Reporter | frankiehung | Assigned To | andriyanov | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | duplicate | ||
Platform | Linux | OS | Debian x86_64 | OS Version | V5.0.4 |
Product Version | 0.20.1 | ||||
Summary | 695: Add IPV4 space error | ||||
Description | add prefix 192.168.1.8/30 with name Heartbeat IP is ok, But from Browse show prefix is 255.255.255.252/32 , This setting on Version 0.19.14 is ok. Please see attache file | ||||
Tags | No tags attached. | ||||
duplicate of | 643 | closed | andriyanov | New Subnet is added wrong |
I believe the issue is a duplicate of this bug: http://bugs.racktables.org/view.php?id=643 Please apply the patch posted there and confirm. |
|
use ID 0000643 Notes 0000903 Seems that your PHP version is returning a negative integer from unpack ('N', "4byt"), which is terribly wrong. Please try this patch: does it help? diff --git a/wwwroot/inc/functions.php b/wwwroot/inc/functions.php index b4f07ef..815695b 100644 --- a/wwwroot/inc/functions.php +++ b/wwwroot/inc/functions.php @@ -2229,8 +2229,10 @@ function ip4_bin2int ($ip_bin) { if (4 != strlen ($ip_bin)) throw new InvalidArgException ('ip_bin', $ip_bin, "Invalid binary IP"); - $list = unpack ('N', $ip_bin); - return array_shift ($list); + $ret = array_first (unpack ('N', $ip_bin)); + if (PHP_INT_SIZE > 4 && $ret < 0) + $ret = $ret & 0xffffffff; + return $ret; } This patch can work. Thank you ! |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2012-12-10 10:21 | frankiehung | New Issue | |
2012-12-10 10:21 | frankiehung | Status | new => assigned |
2012-12-10 10:21 | frankiehung | Assigned To | => andriyanov |
2012-12-10 10:21 | frankiehung | File Added: racktables.zip | |
2012-12-10 16:10 | andriyanov | Note Added: 0001027 | |
2012-12-10 16:10 | andriyanov | Resolution | open => duplicate |
2012-12-11 03:23 | frankiehung | Note Added: 0001029 | |
2012-12-11 03:24 | frankiehung | Note Edited: 0001029 | |
2012-12-15 17:03 | andriyanov | Status | assigned => closed |
2012-12-17 07:01 | infrastation | Relationship added | duplicate of 643 |