summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjch <jch@FreeBSD.org>2016-10-09 21:02:33 +0000
committerjch <jch@FreeBSD.org>2016-10-09 21:02:33 +0000
commit4879b7e1393555cd61cdb72e4519a59b307d32c6 (patch)
tree3cdb40dd1f97ad3ab9b7c0ebb2fb1b27c2e13be1
parentae15d6ead64228cd025e008b05eecf9f26c71a93 (diff)
downloadFreeBSD-src-4879b7e1393555cd61cdb72e4519a59b307d32c6.zip
FreeBSD-src-4879b7e1393555cd61cdb72e4519a59b307d32c6.tar.gz
MFC r306443:
Fix an issue with accept_filter introduced with r261242: As a side effect of r261242 when using accept_filter the first call to soisconnected() is done earlier in tcp_input() instead of tcp_do_segment() context. Restore the expected behaviour. Note: This call to soisconnected() seems to be extraneous in all cases (with or without accept_filter). Will be addressed in a separate commit. PR: 212920 Reported by: Alexey Tested by: Alexey, jch Sponsored by: Verisign, Inc.
-rw-r--r--sys/netinet/tcp_syncache.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c
index 5bb18b0..f4d15f4 100644
--- a/sys/netinet/tcp_syncache.c
+++ b/sys/netinet/tcp_syncache.c
@@ -918,7 +918,9 @@ syncache_socket(struct syncache *sc, struct socket *lso, struct mbuf *m)
tp->t_keepcnt = sototcpcb(lso)->t_keepcnt;
tcp_timer_activate(tp, TT_KEEP, TP_KEEPINIT(tp));
- soisconnected(so);
+ if ((so->so_options & SO_ACCEPTFILTER) == 0) {
+ soisconnected(so);
+ }
TCPSTAT_INC(tcps_accepts);
return (so);
OpenPOWER on IntegriCloud