Page MenuHomeFreeBSD

Improve comments in nd6_dad_start()
Needs ReviewPublic

Authored by hiren on Jan 30 2015, 7:59 PM.

Details

Reviewers
hrs
bz
Summary

Add a condition for when to not do DAD and rearrange for better readability.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

hiren retitled this revision from to Improve comments in nd6_dad_start().
hiren updated this object.
hiren edited the test plan for this revision. (Show Details)
hiren added reviewers: bz, hrs.
  • The state "tentative" is for an address, not an interface.
  • nd6_dad_start() is not supposed to be called for an address with no "tentative" flag. If it happens, it is just a bug or something goes wrong. So it is a bit strange to have it as a comment of "cases when no DAD required".
In D1739#3, @hrs wrote:
  • The state "tentative" is for an address, not an interface.
  • nd6_dad_start() is not supposed to be called for an address with no "tentative" flag. If it happens, it is just a bug or something goes wrong. So it is a bit strange to have it as a comment of "cases when no DAD required".

I understand that part but I am just trying to match 3 checks we do with comments on the top to make the code more verbose.

Any better way to word it?

In D1739#4, @hiren wrote:

I understand that part but I am just trying to match 3 checks we do with comments on the top to make the code more verbose.

Any better way to word it?

So please add a sentence which explains the "tentative" case is not expected to happen and the check has been added for debugging purpose, while the other two cases are expected in normal situation.