View Issue Details

IDProjectCategoryView StatusLast Update
857RackTablesIPv4/IPv6/SLBpublic2013-05-14 07:54
ReporterGoranTornqvist Assigned Toandriyanov  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionno change required 
PlatformApacheOSCentOSOS Version5.7
Product Version0.20.4 
Summary857: index.php?page=ipv6space gives error Invalid v4 prefix length
Description/index.php?page=ipv6space
“Argument 'mask' of value 33 is invalid (Invalid v4 prefix length).”
Steps To ReproduceThis looks like the flow:

$tabhandler['ipv6space']['default'] = 'renderIPSpace';
renderIPSpace => prepareIPTree => iptree_fill => iptree_embed => constructIPRange ($ip_bin, $mask)

At the crash the $ip_bin variable contains: * \r?
And the $mask variable contains 33

Looks like that it is this ipv6net in our database that constructIPRange handles like a ipv4net

inet6num: 2a02:d98::/32
netname: SE-CYPOINT-20090423
descr: Cypoint IT Services AB
country: SE
org: ORG-CHA2-RIPE
admin-c: CPH-RIPE
tech-c: CPH-RIPE
status: ALLOCATED-BY-RIR
mnt-by: RIPE-NCC-HM-MNT
mnt-lower: CYPOINT-MNT
mnt-routes: CYPOINT-MNT
source: RIPE # Filtered

Sql Data:
INSERT INTO `IPv6Network` (`id`, `ip`, `mask`, `last_ip`, `name`, `comment`) VALUES
(13, '*\r?', 32, '2a020d9800000000', 'SE-CYPOINT-20090423', '-');

And I believe this is the part in inc/functions.php that causes it to be handled as a ipv4address
switch (strlen ($ip_bin))
        {
                case 4: // IPv4
TagsNo tags attached.

Activities

andriyanov

andriyanov

2013-05-14 07:54

reporter   ~0001399

Your DB record seems to be invalid. Did you insert it manually using given SQL query? Anyway, the query does not contain valid 16-byte strings in both ip and last_ip fields.

Issue History

Date Modified Username Field Change
2013-05-14 07:44 GoranTornqvist New Issue
2013-05-14 07:44 GoranTornqvist Status new => assigned
2013-05-14 07:44 GoranTornqvist Assigned To => andriyanov
2013-05-14 07:54 andriyanov Note Added: 0001399
2013-05-14 07:54 andriyanov Status assigned => closed
2013-05-14 07:54 andriyanov Resolution open => no change required