Page MenuHomeFreeBSD

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

Authored by maxim on Thu, Sep 10, 3:09 AM.
Tags
None
Referenced Files
F171692850: D59556.id186317.diff
Sat, Sep 12, 6:20 PM
F171680654: D59556.id.diff
Sat, Sep 12, 3:55 PM
F171668501: D59556.diff
Sat, Sep 12, 1:39 PM
F171666151: D59556.diff
Sat, Sep 12, 1:17 PM
Unknown Object (File)
Fri, Sep 11, 8:46 PM
Unknown Object (File)
Fri, Sep 11, 5:40 PM
Unknown Object (File)
Fri, Sep 11, 3:17 AM
Unknown Object (File)
Fri, Sep 11, 1:06 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 Passed
Unit
No Test Coverage
Build Status
Buildable 76726
Build 73609: arc lint + arc unit

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.