Page MenuHomeFreeBSD

Add basic TCP options to tcp_respond()
ClosedPublic

Authored by jtl on Jan 7 2016, 12:48 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sep 17 2024, 12:53 AM
Unknown Object (File)
Sep 11 2024, 3:45 PM
Unknown Object (File)
Sep 9 2024, 2:00 AM
Unknown Object (File)
Sep 8 2024, 2:50 PM
Unknown Object (File)
Sep 8 2024, 11:38 AM
Unknown Object (File)
Sep 8 2024, 5:14 AM
Unknown Object (File)
Sep 7 2024, 2:20 AM
Unknown Object (File)
Sep 7 2024, 2:19 AM
Subscribers

Details

Summary

As reported on the transport@ and current@ mailing lists, we are not compliant with RFC 7323, which requires that we send a timestamp option on all packets (except, optionally, RSTs) after the session is established.

This patch:

  1. Adds that support.
  2. Adds the signature option, if appropriate.
  3. Reorders the variables.
  4. Eliminates a variable that could be replaced by a constant.
Test Plan

It appears to work correctly on my local machine.
Will run 'make tinderbox' to look for cross-platform strangeness.
No plans to test the signature option myself.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jtl retitled this revision from to Add basic TCP options to tcp_respond().
jtl updated this object.
jtl edited the test plan for this revision. (Show Details)
jtl added a reviewer: transport.
jtl edited edge metadata.

Fix typo

*bump*

I have some time to work on this Tuesday. If I get comments by then, I'll address them. Otherwise, I plan to commit this.

Has this been updated based on all the recent rototilling?

I tried but following the logic in PB is impossible; I need to go side-by-sde with the full source. Please don't just go ahead and commit; sorry it takes a bit.

sys/netinet/tcp_subr.c
859 ↗(On Diff #11983)

Not sure what the current policy is but I think trying to avoid bool is still the case.

954 ↗(On Diff #11983)

I guess having the %p, m in that KASSERT would be helpful as well.

In D4808#105714, @gnn wrote:

Has this been updated based on all the recent rototilling?

@gnn: As far as I know, there have been no changes to this function since I wrote the diff, nor am I aware of any TCP commits that would impact this.

In D4808#105717, @bz wrote:

I tried but following the logic in PB is impossible; I need to go side-by-sde with the full source. Please don't just go ahead and commit; sorry it takes a bit.

@bz: ACK. I just don't want this to gather dust so long that it doesn't apply cleanly anymore. ;-)

sys/netinet/tcp_subr.c
859 ↗(On Diff #11983)

style(9) was recently updated to explicitly allow bool. If style(9) is inaccurate, it should be fixed.

954 ↗(On Diff #11983)

Agreed. Will modify before commit.

hiren added a reviewer: hiren.
hiren added a subscriber: hiren.

Seems okay to me.
But I strongly encourage splitting out functional and cleanup changes into separate commits. And I assume you've tested the patch (excluding TCP_SIGNATURE part) to make sure you see expected results.

Thanks for picking this up. :-)

This revision is now accepted and ready to land.Jan 21 2016, 12:42 AM
In D4808#106261, @hiren wrote:

Seems okay to me.
But I strongly encourage splitting out functional and cleanup changes into separate commits.

I can do that.

And I assume you've tested the patch (excluding TCP_SIGNATURE part) to make sure you see expected results.

Yes, I have.

Thanks for the review! I'll get this committed once I hear from @bz about his pending review.

This revision was automatically updated to reflect the committed changes.