Page MenuHomeFreeBSD

Add basic TCP options to tcp_respond()
ClosedPublic

Authored by jtl on Jan 7 2016, 12:48 AM.
Tags
None
Referenced Files
F103794019: D4808.diff
Fri, Nov 29, 1:12 PM
Unknown Object (File)
Thu, Nov 28, 5:21 PM
Unknown Object (File)
Thu, Nov 28, 5:20 PM
Unknown Object (File)
Thu, Nov 28, 5:20 PM
Unknown Object (File)
Thu, Nov 28, 5:20 PM
Unknown Object (File)
Thu, Nov 28, 5:14 PM
Unknown Object (File)
Thu, Nov 28, 4:57 PM
Unknown Object (File)
Sep 17 2024, 12:53 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 Passed
Unit
No Test Coverage
Build Status
Buildable 1978
Build 1986: arc lint + arc unit

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

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

954

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

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

954

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.