svn commit: r306443 - head/sys/netinet

Julien Charbon jch at FreeBSD.org
Thu Sep 29 11:18:49 UTC 2016


Author: jch
Date: Thu Sep 29 11:18:48 2016
New Revision: 306443
URL: https://svnweb.freebsd.org/changeset/base/306443

Log:
  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.
  MFC after:		1 week

Modified:
  head/sys/netinet/tcp_syncache.c

Modified: head/sys/netinet/tcp_syncache.c
==============================================================================
--- head/sys/netinet/tcp_syncache.c	Thu Sep 29 11:13:51 2016	(r306442)
+++ head/sys/netinet/tcp_syncache.c	Thu Sep 29 11:18:48 2016	(r306443)
@@ -918,7 +918,9 @@ syncache_socket(struct syncache *sc, str
 	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);


More information about the svn-src-head mailing list