Menu

#281 Error in IPv6 Subnet calculation

1.1
closed
nobody
1
2016-02-02
2015-01-28
No

Hi
There seems to be some bug in calculating subnets in IPv6.
I added 2001:db8:0:1::8/126
Under this i added 2001:db8:0:1::8/127 and 2001:db8:0:1::a/127
Now it says that Free space is : 2001:db8:0:1::c - 2001:db8:0:1::d ( 2 )
However, 2001:db8:0:1::8/127 is only from ::8 to ::b. ::c and ::d are in the next /126.

When I try to add this Subnet 2001:db8:0:1::c/127 it correctly says that "Nested subnet not in root subnet!"

1 Attachments

Discussion

  • Miha Petkovsek

    Miha Petkovsek - 2015-01-28

    Hi Jon, I am aware of this, will push fix to next devel release.

    Change this in ip_addr/printslaves something script:

    $maxh_m = gmp_strval(gmp_add(MaxHosts( $master['mask'], $type ),2));
    

    to

    if($type==1) {$maxh_m = gmp_strval(MaxHosts( $master['mask'], $type ));} 
    else {$maxh_m = gmp_strval(gmp_add(MaxHosts( $master['mask'], $type ),2));}
    

    brm

     
  • Jacques Girardi Busnardo

    Hi,
    This solution does not fix problem completely. I didn't make the test very well, but in /60 the same problem happen.

    In my test I split /32 in /33 in /40 in /48 in /60. After fix, only /60.

     
  • Anonymous

    Anonymous - 2015-06-11

    This problem has been solved? I also have problems to divide smaller networks.

     
  • Anonymous

    Anonymous - 2015-06-18

    Any temporary solution?

     
  • Miha Petkovsek

    Miha Petkovsek - 2016-02-02
    • status: open --> closed
     
  • Miha Petkovsek

    Miha Petkovsek - 2016-02-02

    Fixed in 1.2

     

Anonymous
Anonymous

Add attachments
Cancel