Honor net.inet.tcp.drop_synfin in other states than LISTEN
ClosedPublic

Authored by tuexen on Mar 5 2017, 11:08 AM.

Details

Summary

Currently the sysctl variable net.inet.tcp.drop_synfin is not honored in all states, for example not in SYN-SENT.
This patch adds code to check the sysctl variable in other states than LISTEN.

Test Plan

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
tuexen updated this revision to Diff 25996.Mar 5 2017, 11:08 AM
tuexen retitled this revision from to Honor net.inet.tcp.drop_synfin in other states then LISTEN.
tuexen updated this object.
tuexen edited the test plan for this revision. (Show Details)
tuexen added reviewers: gnn, rrs, hiren, transport.
tuexen set the repository for this revision to rS FreeBSD src repository.
tuexen retitled this revision from Honor net.inet.tcp.drop_synfin in other states then LISTEN to Honor net.inet.tcp.drop_synfin in other states than LISTEN.Mar 5 2017, 11:09 AM
tuexen edited edge metadata.
gnn requested changes to this revision.Mar 30 2017, 1:12 AM

Other than the need for some clarifying parentheses I think this is OK.

sys/netinet/tcp_input.c
1557 ↗(On Diff #25996)

I'd like some clarifying parentheses here as well as in all the other similar if statements below.

This revision now requires changes to proceed.Mar 30 2017, 1:12 AM
tuexen updated this revision to Diff 26948.Apr 3 2017, 11:13 AM
tuexen edited edge metadata.

Address gnn's comment by adding parentheses.

ae added a subscriber: ae.Apr 6 2017, 1:47 PM
ae added inline comments.
sys/netinet/tcp_input.c
248 ↗(On Diff #26948)

This declaration seems unnecessary. It is already defined at the line 147.

tuexen updated this revision to Diff 27156.Apr 6 2017, 8:57 PM

Address Andrey's comment.

gnn accepted this revision.Apr 11 2017, 2:00 PM
This revision is now accepted and ready to land.Apr 11 2017, 2:00 PM
This revision was automatically updated to reflect the committed changes.