Page MenuHomeFreeBSD

ping: do a better job with what we received from the net, part 2
ClosedPublic

Authored by maxim on Thu, Sep 10, 3:09 AM.
Tags
None
Referenced Files
F174599587: D59556.id186317.diff
Sun, Oct 4, 2:02 PM
Unknown Object (File)
Thu, Oct 1, 6:56 AM
Unknown Object (File)
Mon, Sep 28, 3:41 PM
Unknown Object (File)
Sun, Sep 27, 3:42 PM
Unknown Object (File)
Sat, Sep 26, 10:54 AM
Unknown Object (File)
Sat, Sep 26, 7:11 AM
Unknown Object (File)
Fri, Sep 25, 8:45 AM
Unknown Object (File)
Fri, Sep 25, 6:22 AM
Subscribers

Details

Summary

When we see a difference between the payload we sent and what we
received we dump both but we were not prepared for the case when
the received payload is less that we sent. In this case we were trying
to dump more than needed.

Funny enough, 23 years ago I already fixed a similar issue here but
didn't pay attention to this small dumping loop.

MFC after: 1 month
Found with: Claude Code Sonnet 5

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

maxim requested review of this revision.Thu, Sep 10, 3:09 AM
jlduran added a subscriber: jlduran.

Please see the suggested test (D59582). Ideally it should be squashed with this change. Thank you!

This revision is now accepted and ready to land.Fri, Sep 11, 3:27 AM

Please see the suggested test (D59582). Ideally it should be squashed with this change. Thank you!

Wow, cool, thank you!

Is it possible to implement something similar for D59555?

Please see the suggested test (D59582). Ideally it should be squashed with this change. Thank you!

Wow, cool, thank you!

Is it possible to implement something similar for D59555?

I have created tests for regular mask and timestamp replies, though I have not been able to trigger that particular code path yet. I'll look into it this weekend. Any insights on how to achieve this with a FreeBSD kernel would be greatly appreciated.
In the meantime, that fix is still valuable for downstream consumers and to silence static analysis tools.