Page MenuHomeVyOS Platform

Wrong DHCP server pool size in statistics
Closed, ResolvedPublic



When running

show dhcp server statistics

the pool sizes seem to be not correct. This is due to the get_pool_size() function in src/op_mode/, which just subtracts a range's lower bound from its upper bound and uses the result as pool size. However, since according to the man page [0] both boundaries are inclusive, it should add +1 to the subtraction result:

The range statement gives the lowest and highest IP addresses in a range.


I could file a PR if you like, already prepared it.

Best regards


Difficulty level
Unknown (require assessment)
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible

Event Timeline

efficiosoft created this task.
efficiosoft created this object in space S1 VyOS Public.
efficiosoft renamed this task from Fix DHCP pool size in statistics to Wrong DHCP server pool size in statistics.Jul 20 2020, 1:49 PM

I could file a PR if you like, already prepared it.

Please do, that would be very welcome!

Ok, done here.

As this is my first Phabricator experience, is there anything else I have to do?