Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Sep 2016 11:18:48 +0000 (UTC)
From:      Julien Charbon <jch@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r306443 - head/sys/netinet
Message-ID:  <201609291118.u8TBIm8r060488@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201609291118.u8TBIm8r060488>