Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Nov 2013 15:09:40 +0000 (UTC)
From:      Mikolaj Golub <trociny@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r258258 - head/sys/netinet
Message-ID:  <201311171509.rAHF9eot035721@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: trociny
Date: Sun Nov 17 15:09:39 2013
New Revision: 258258
URL: http://svnweb.freebsd.org/changeset/base/258258

Log:
  Deregister helper hooks on vnet destroy.

Modified:
  head/sys/netinet/tcp_subr.c

Modified: head/sys/netinet/tcp_subr.c
==============================================================================
--- head/sys/netinet/tcp_subr.c	Sun Nov 17 14:44:22 2013	(r258257)
+++ head/sys/netinet/tcp_subr.c	Sun Nov 17 15:09:39 2013	(r258258)
@@ -432,6 +432,7 @@ tcp_init(void)
 void
 tcp_destroy(void)
 {
+	int error;
 
 	tcp_reass_destroy();
 	tcp_hc_destroy();
@@ -440,6 +441,19 @@ tcp_destroy(void)
 	in_pcbinfo_destroy(&V_tcbinfo);
 	uma_zdestroy(V_sack_hole_zone);
 	uma_zdestroy(V_tcpcb_zone);
+
+	error = hhook_head_deregister(V_tcp_hhh[HHOOK_TCP_EST_IN]);
+	if (error != 0) {
+		printf("%s: WARNING: unable to deregister helper hook "
+		    "type=%d, id=%d: error %d returned\n", __func__,
+		    HHOOK_TYPE_TCP, HHOOK_TCP_EST_IN, error);
+	}
+	error = hhook_head_deregister(V_tcp_hhh[HHOOK_TCP_EST_OUT]);
+	if (error != 0) {
+		printf("%s: WARNING: unable to deregister helper hook "
+		    "type=%d, id=%d: error %d returned\n", __func__,
+		    HHOOK_TYPE_TCP, HHOOK_TCP_EST_OUT, error);
+	}
 }
 #endif
 



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