CyberShadow / dhcptest

Cross-platform DHCP test client
https://blog.cy.md/2013/01/10/dhcp-test-client
363 stars 57 forks source link

Adding Option 121 (Classless static route) #30

Closed Dronec closed 1 year ago

CyberShadow commented 1 year ago

I've read the RFC and it seems to describe something that doesn't align with the implementation here. For one thing, it looks like the route descriptors are variable-length.

Dronec commented 1 year ago

good point! I've oversimplifed it and only looked at the output of my local DHCP server. Should've read the RFC first. I'll update the code and make another push.

CyberShadow commented 1 year ago

I've made some small changes, could you please check if it still works on your end?

Dronec commented 1 year ago

I've made some small changes, could you please check if it still works on your end?

Pulled, recompiled and tested, looks good image

CyberShadow commented 1 year ago

Thanks!

CyberShadow commented 1 year ago

Oops, actually I forgot to push the bulk of the changes I wanted to include... I pushed them to master.

https://github.com/CyberShadow/dhcptest/commit/19cd1e2fe13c779bce67dc7bbfe526a6d3d31f08

Dronec commented 1 year ago

Thanks!

Thank you! This tool came very handy for testing DHCP design.

Dronec commented 1 year ago

Oops, actually I forgot to push the bulk of the changes I wanted to include... I pushed them to master.

19cd1e2

Hate to say that, but the refactoring broke it: image

You can fix it by changing row #406 to

ubyte subnetSignificantBytes = cast(ubyte)ceil(maskBits * 0.125);

image

CyberShadow commented 1 year ago

Hate to say that, but the refactoring broke it:

Well, thanks for saying it! I forgot the parens. 🤦

I pushed a fix, could you please test it?

Dronec commented 1 year ago

Hate to say that, but the refactoring broke it:

Well, thanks for saying it! I forgot the parens. 🤦

I pushed a fix, could you please test it?

tested, everything looks good. Thanks!