Index: sys/netinet/libalias/alias_sctp.c =================================================================== --- sys/netinet/libalias/alias_sctp.c (revision 188297) +++ sys/netinet/libalias/alias_sctp.c (working copy) @@ -95,6 +95,9 @@ #include #endif //#ifdef _KERNEL +extern uint32_t (*update_crc32_ptr)(uint32_t, unsigned char *, unsigned int); +extern uint32_t (*sctp_finalize_crc32_ptr)(uint32_t); + /* ---------------------------------------------------------------------- * FUNCTION PROTOTYPES * ---------------------------------------------------------------------- @@ -943,7 +946,10 @@ /* calculate SCTP header CRC32 */ sctp_hdr->checksum = 0; - sctp_hdr->checksum = sctp_finalize_crc32(update_crc32(0xffffffff, (unsigned char *) sctp_hdr, sctp_size)); + if (update_crc32_ptr != NULL) + sctp_hdr->checksum = sctp_finalize_crc32_ptr( + update_crc32_ptr(0xffffffff, (unsigned char *) sctp_hdr, + sctp_size)); memcpy(sm->ip_hdr, ip, ip_size); Index: sys/netinet/sctp_usrreq.c =================================================================== --- sys/netinet/sctp_usrreq.c (revision 188297) +++ sys/netinet/sctp_usrreq.c (working copy) @@ -49,11 +49,13 @@ #include #include #include +#include #include +/* alias sctp hooks. */ +extern uint32_t (*update_crc32_ptr)(uint32_t, unsigned char *, unsigned int); +extern uint32_t (*sctp_finalize_crc32_ptr)(uint32_t); - - void sctp_init(void) { @@ -88,13 +90,16 @@ bzero(&SCTP_BASE_VAR(packet_log_buffer), SCTP_PACKET_LOG_SIZE); #endif - + update_crc32_ptr = update_crc32; + sctp_finalize_crc32_ptr = sctp_finalize_crc32; } void sctp_finish(void) { sctp_pcb_finish(); + update_crc32_ptr = NULL; + sctp_finalize_crc32_ptr = NULL; } Index: sys/netinet/ip_input.c =================================================================== --- sys/netinet/ip_input.c (revision 188297) +++ sys/netinet/ip_input.c (working copy) @@ -223,6 +223,10 @@ static void ip_freef(struct ipqhead *, struct ipq *); +/* alias sctp hooks. */ +uint32_t (*update_crc32_ptr)(uint32_t, unsigned char *, unsigned int) = NULL; +uint32_t (*sctp_finalize_crc32_ptr)(uint32_t) = NULL; + /* * IP initialization: fill in IP protocol switch table. * All protocols not implemented in kernel go to raw IP protocol handler.