Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F108591717
D35663.id107573.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
6 KB
Referenced Files
None
Subscribers
None
D35663.id107573.diff
View Options
Index: sys/netinet/tcp_input.c
===================================================================
--- sys/netinet/tcp_input.c
+++ sys/netinet/tcp_input.c
@@ -2315,8 +2315,7 @@
* If new data are received on a connection after the
* user processes are gone, then RST the other end.
*/
- if ((so->so_state & SS_NOFDREF) &&
- tp->t_state > TCPS_CLOSE_WAIT && tlen) {
+ if (tp->t_state > TCPS_CLOSE_WAIT && tlen) {
if ((s = tcp_log_addrs(inc, th, NULL, NULL))) {
log(LOG_DEBUG, "%s; %s: %s: Received %d bytes of data "
"after socket was closed, "
Index: sys/netinet/tcp_stacks/bbr.c
===================================================================
--- sys/netinet/tcp_stacks/bbr.c
+++ sys/netinet/tcp_stacks/bbr.c
@@ -9493,15 +9493,12 @@
/*
* If new data are received on a connection after the user processes
* are gone, then RST the other end.
+ * We call a new function now so we might continue and setup
+ * to reset at all data being ack'd.
*/
- if ((so->so_state & SS_NOFDREF) && tlen) {
- /*
- * We call a new function now so we might continue and setup
- * to reset at all data being ack'd.
- */
- if (bbr_check_data_after_close(m, bbr, tp, &tlen, th, so))
- return (1);
- }
+ if (tp->t_state > TCPS_CLOSE_WAIT && tlen &&
+ bbr_check_data_after_close(m, bbr, tp, &tlen, th, so))
+ return (1);
/*
* If last ACK falls within this segment's sequence numbers, record
* its timestamp. NOTE: 1) That the test incorporates suggestions
@@ -9620,15 +9617,12 @@
/*
* If new data are received on a connection after the user processes
* are gone, then RST the other end.
+ * We call a new function now so we might continue and setup
+ * to reset at all data being ack'd.
*/
- if ((so->so_state & SS_NOFDREF) && tlen) {
- /*
- * We call a new function now so we might continue and setup
- * to reset at all data being ack'd.
- */
- if (bbr_check_data_after_close(m, bbr, tp, &tlen, th, so))
- return (1);
- }
+ if (tp->t_state > TCPS_CLOSE_WAIT && tlen &&
+ bbr_check_data_after_close(m, bbr, tp, &tlen, th, so))
+ return (1);
/*
* If last ACK falls within this segment's sequence numbers, record
* its timestamp. NOTE: 1) That the test incorporates suggestions
@@ -9733,15 +9727,12 @@
/*
* If new data are received on a connection after the user processes
* are gone, then RST the other end.
+ * We call a new function now so we might continue and setup
+ * to reset at all data being ack'd.
*/
- if ((so->so_state & SS_NOFDREF) && tlen) {
- /*
- * We call a new function now so we might continue and setup
- * to reset at all data being ack'd.
- */
- if (bbr_check_data_after_close(m, bbr, tp, &tlen, th, so))
- return (1);
- }
+ if (tp->t_state > TCPS_CLOSE_WAIT && tlen &&
+ bbr_check_data_after_close(m, bbr, tp, &tlen, th, so))
+ return (1);
/*
* If last ACK falls within this segment's sequence numbers, record
* its timestamp. NOTE: 1) That the test incorporates suggestions
@@ -9850,17 +9841,12 @@
* If new data are received on a connection after the user processes
* are gone, then we may RST the other end depending on the outcome
* of bbr_check_data_after_close.
+ * We call a new function now so we might continue and setup
+ * to reset at all data being ack'd.
*/
- if ((so->so_state & SS_NOFDREF) &&
- tlen) {
- /*
- * We call a new function now so we might continue and setup
- * to reset at all data being ack'd.
- */
- if (bbr_check_data_after_close(m, bbr, tp, &tlen, th, so))
- return (1);
- }
- INP_WLOCK_ASSERT(tp->t_inpcb);
+ if (tp->t_state > TCPS_CLOSE_WAIT && tlen &&
+ bbr_check_data_after_close(m, bbr, tp, &tlen, th, so))
+ return (1);
/*
* If last ACK falls within this segment's sequence numbers, record
* its timestamp. NOTE: 1) That the test incorporates suggestions
Index: sys/netinet/tcp_stacks/rack.c
===================================================================
--- sys/netinet/tcp_stacks/rack.c
+++ sys/netinet/tcp_stacks/rack.c
@@ -11855,10 +11855,9 @@
* If new data are received on a connection after the user processes
* are gone, then RST the other end.
*/
- if ((so->so_state & SS_NOFDREF) && tlen) {
- if (rack_check_data_after_close(m, tp, &tlen, th, so))
- return (1);
- }
+ if (tp->t_state > TCPS_CLOSE_WAIT && tlen &&
+ rack_check_data_after_close(m, tp, &tlen, th, so))
+ return (1);
/*
* If last ACK falls within this segment's sequence numbers, record
* its timestamp. NOTE: 1) That the test incorporates suggestions
@@ -11983,10 +11982,9 @@
* If new data are received on a connection after the user processes
* are gone, then RST the other end.
*/
- if ((so->so_state & SS_NOFDREF) && tlen) {
- if (rack_check_data_after_close(m, tp, &tlen, th, so))
- return (1);
- }
+ if (tp->t_state > TCPS_CLOSE_WAIT && tlen &&
+ rack_check_data_after_close(m, tp, &tlen, th, so))
+ return (1);
/*
* If last ACK falls within this segment's sequence numbers, record
* its timestamp. NOTE: 1) That the test incorporates suggestions
@@ -12097,10 +12095,9 @@
* If new data are received on a connection after the user processes
* are gone, then RST the other end.
*/
- if ((so->so_state & SS_NOFDREF) && tlen) {
- if (rack_check_data_after_close(m, tp, &tlen, th, so))
- return (1);
- }
+ if (tp->t_state > TCPS_CLOSE_WAIT && tlen &&
+ rack_check_data_after_close(m, tp, &tlen, th, so))
+ return (1);
/*
* If last ACK falls within this segment's sequence numbers, record
* its timestamp. NOTE: 1) That the test incorporates suggestions
@@ -12212,11 +12209,9 @@
* If new data are received on a connection after the user processes
* are gone, then RST the other end.
*/
- if ((so->so_state & SS_NOFDREF) &&
- tlen) {
- if (rack_check_data_after_close(m, tp, &tlen, th, so))
- return (1);
- }
+ if (tp->t_state > TCPS_CLOSE_WAIT && tlen &&
+ rack_check_data_after_close(m, tp, &tlen, th, so))
+ return (1);
/*
* If last ACK falls within this segment's sequence numbers, record
* its timestamp. NOTE: 1) That the test incorporates suggestions
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 27, 5:52 PM (2 h, 16 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16202172
Default Alt Text
D35663.id107573.diff (6 KB)
Attached To
Mode
D35663: tcp: use a TCP flag to check if connection has been close(2)d
Attached
Detach File
Event Timeline
Log In to Comment