Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Oct 2019 09:22:23 +0000 (UTC)
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r354018 - head/sys/netinet
Message-ID:  <201910240922.x9O9MNjR031352@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Thu Oct 24 09:22:23 2019
New Revision: 354018
URL: https://svnweb.freebsd.org/changeset/base/354018

Log:
  Store a handle for the event handler. This will be used when unloading the
  SCTP as a module.
  
  Obtained from:		markj@

Modified:
  head/sys/netinet/sctp_pcb.h
  head/sys/netinet/sctp_usrreq.c

Modified: head/sys/netinet/sctp_pcb.h
==============================================================================
--- head/sys/netinet/sctp_pcb.h	Thu Oct 24 08:15:40 2019	(r354017)
+++ head/sys/netinet/sctp_pcb.h	Thu Oct 24 09:22:23 2019	(r354018)
@@ -259,6 +259,7 @@ struct sctp_base_info {
 	int packet_log_end;
 	uint8_t packet_log_buffer[SCTP_PACKET_LOG_SIZE];
 #endif
+	eventhandler_tag eh_tag;
 };
 
 /*-

Modified: head/sys/netinet/sctp_usrreq.c
==============================================================================
--- head/sys/netinet/sctp_usrreq.c	Thu Oct 24 08:15:40 2019	(r354017)
+++ head/sys/netinet/sctp_usrreq.c	Thu Oct 24 09:22:23 2019	(r354018)
@@ -90,8 +90,8 @@ sctp_init(void)
 	SCTP_BASE_VAR(packet_log_end) = 0;
 	memset(&SCTP_BASE_VAR(packet_log_buffer), 0, SCTP_PACKET_LOG_SIZE);
 #endif
-	EVENTHANDLER_REGISTER(rt_addrmsg, sctp_addr_change_event_handler,
-	    NULL, EVENTHANDLER_PRI_FIRST);
+	SCTP_BASE_VAR(eh_tag) = EVENTHANDLER_REGISTER(rt_addrmsg,
+	    sctp_addr_change_event_handler, NULL, EVENTHANDLER_PRI_FIRST);
 }
 
 #ifdef VIMAGE



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