Page MenuHomeFreeBSD

remove network mask calculation for Classful network
ClosedPublic

Authored by kczekirda on Dec 9 2016, 10:54 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 17, 4:56 PM
Unknown Object (File)
Wed, Nov 13, 9:26 AM
Unknown Object (File)
Oct 20 2024, 4:10 AM
Unknown Object (File)
Oct 20 2024, 4:10 AM
Unknown Object (File)
Oct 20 2024, 4:10 AM
Unknown Object (File)
Oct 20 2024, 4:10 AM
Unknown Object (File)
Oct 20 2024, 4:10 AM
Unknown Object (File)
Oct 20 2024, 4:10 AM
Subscribers

Details

Summary

Nowadays it's not necessary to compute network mask from the IP address and compare to given by DHCP.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

kczekirda retitled this revision from to remove network mask calculation for Classful network.
kczekirda updated this object.
kczekirda edited the test plan for this revision. (Show Details)
kczekirda added reviewers: bapt, imp, ian.

There is an problem - not enough context. You can use arcanist, or just tell svn diff to include more {all} lines.

IMO it seems to make sense, but there is the question, how much testing have you done, any class[less] tests?

Tested on:

  • 192.168.1.0/24
  • 192.168.1.0/25
  • 10.0.0.0/16
  • 10.0.0.0/24
  • 176.119.56.0/22
tsoome edited edge metadata.

Seems good, I think.

This revision is now accepted and ready to land.Dec 12 2016, 4:15 PM
glebius requested changes to this revision.Dec 12 2016, 9:16 PM
glebius added a reviewer: glebius.
glebius added a subscriber: glebius.

This revision will make BOOTP incompatible towards old classful BOOTP server. If a BOOTP server doesn't supply mask at all, you will end with zero mask.

Of course, the class mask shall not override mask supplied from server. But support for classes should remain, it doesn't hurt. So, the whole code removed should remain, but wrapped into "if (!smask) { }".

This revision now requires changes to proceed.Dec 12 2016, 9:16 PM
kczekirda edited edge metadata.

It's should enough for backwards compatibility.

glebius edited edge metadata.

This looks correct to me. But I haven't reviewed the consequences of writing directly to the "netmask", which is also shared with rarp.c and udp.c

Thanks!

This revision is now accepted and ready to land.Dec 15 2016, 6:55 PM
bapt edited edge metadata.
This revision was automatically updated to reflect the committed changes.