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
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to