Menu

#9 ip_pool does not support ip ranges smaller than a /24

open
nobody
5
2008-03-27
2008-03-27
Anonymous
No

It apears that ranges smaller than a /24 are not handled correctly by l2tpns.

For example, if you add 192.168.2.64/26 to the ip_pool config file, l2tpns will still hand out 192.168.2.64 as the first address when this should be reserved as the network address.

I believe this should be an easy fix in the l2tpns.c add_to_ip_pool function.

I would attempt it myself, but my c programming is not that flash :)

Discussion

  • Leighton Weymouth

    Logged In: YES
    user_id=661262
    Originator: NO

    Righto,

    I have had a crack at this and it appears to work as expected now... See attached patch for version 2.1.21.

    Comments would be good. Thanks.

     
  • Nobody/Anonymous

    Logged In: NO

    Network/broadcast addresses are not relevant for PPP links.

    Admittedly, I'm not using a subnet smaller than a /24 but my home ADSL connection (connected to my production l2tpns cluster) is happy with its' x.x.x.0 IP address.

    So, technically not a bug, and as long as you are routing 192.168.2.64/26 to your l2tpns cluster, you should have no problems if you assign 192.168.2.64 or 192.168.2.127 to an end-user.

    For that reason alone, I would hazard a guess that your patch won't get accepted upstream.

     

Log in to post a comment.

MongoDB Logo MongoDB