Merge ~ahasenack/ubuntu/+source/cacti:focal-cacti-32bit-dep8-failure into ubuntu/+source/cacti:ubuntu/devel
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Andreas Hasenack | ||||
Approved revision: | 4b05e01490f95a587a95b1a3bf63fba16e42d6d7 | ||||
Merged at revision: | 4b05e01490f95a587a95b1a3bf63fba16e42d6d7 | ||||
Proposed branch: | ~ahasenack/ubuntu/+source/cacti:focal-cacti-32bit-dep8-failure | ||||
Merge into: | ubuntu/+source/cacti:ubuntu/devel | ||||
Diff against target: |
55 lines (+33/-0) 3 files modified
debian/changelog (+7/-0) debian/patches/fix-32bit-ip-conversion.patch (+25/-0) debian/patches/series (+1/-0) |
||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Christian Ehrhardt (community) | Approve | ||
Canonical Server | Pending | ||
Review via email: mp+380111@code.launchpad.net |
Description of the change
Bileto ticket: https:/
Fix netmask calculation on armhf (32bits).
To test:
sudo apt install php-cli
php -a
Original code:
64bits:
php > $range = 24;
php > var_dump(
int(4294967040) <--- it's an int!
php > var_dump(
string(13) "255.255.255.0"
32bits:
php > $range = 24;
php > var_dump(
float(4294967040) <-- it's a float!
php > var_dump(
PHP Warning: long2ip() expects parameter 1 to be int, float given in php shell code on line 1
NULL
new code, 32bits:
php > $range = 24;
php > var_dump(
string(13) "255.255.255.0"
new code, 64bits:
php > $range = 24;
php > var_dump(
string(13) "255.255.255.0"
php >
Same results on armhf, amd64, ppc64el, s390x, arm64.
Changelog good
Patch good
Upstreaming good (ongoing still)
Fix works as expected
+1