diff options
-rwxr-xr-x | usrsctplib/netinet/sctp_input.c | 30 | ||||
-rwxr-xr-x | usrsctplib/netinet/sctp_pcb.c | 37 | ||||
-rw-r--r-- | usrsctplib/netinet6/sctp6_usrreq.c | 11 |
3 files changed, 4 insertions, 74 deletions
diff --git a/usrsctplib/netinet/sctp_input.c b/usrsctplib/netinet/sctp_input.c index b389cd32..b2a1bb44 100755 --- a/usrsctplib/netinet/sctp_input.c +++ b/usrsctplib/netinet/sctp_input.c @@ -32,7 +32,7 @@ #ifdef __FreeBSD__ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: head/sys/netinet/sctp_input.c 310590 2016-12-26 11:06:41Z tuexen $"); +__FBSDID("$FreeBSD: head/sys/netinet/sctp_input.c 313330 2017-02-06 08:49:57Z ae $"); #endif #include <netinet/sctp_os.h> @@ -5995,34 +5995,6 @@ sctp_common_input_processing(struct mbuf **mm, int iphlen, int offset, int lengt } else if (stcb == NULL) { inp_decr = inp; } -#ifdef IPSEC - /*- - * I very much doubt any of the IPSEC stuff will work but I have no - * idea, so I will leave it in place. - */ - if (inp != NULL) { - switch (dst->sa_family) { -#ifdef INET - case AF_INET: - if (ipsec4_in_reject(m, &inp->ip_inp.inp)) { - SCTP_STAT_INCR(sctps_hdrops); - goto out; - } - break; -#endif -#ifdef INET6 - case AF_INET6: - if (ipsec6_in_reject(m, &inp->ip_inp.inp)) { - SCTP_STAT_INCR(sctps_hdrops); - goto out; - } - break; -#endif - default: - break; - } - } -#endif SCTPDBG(SCTP_DEBUG_INPUT1, "Ok, Common input processing called, m:%p iphlen:%d offset:%d length:%d stcb:%p\n", (void *)m, iphlen, offset, length, (void *)stcb); if (stcb) { diff --git a/usrsctplib/netinet/sctp_pcb.c b/usrsctplib/netinet/sctp_pcb.c index a7335fa2..32877f83 100755 --- a/usrsctplib/netinet/sctp_pcb.c +++ b/usrsctplib/netinet/sctp_pcb.c @@ -32,7 +32,7 @@ #ifdef __FreeBSD__ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: head/sys/netinet/sctp_pcb.c 310590 2016-12-26 11:06:41Z tuexen $"); +__FBSDID("$FreeBSD: head/sys/netinet/sctp_pcb.c 313330 2017-02-06 08:49:57Z ae $"); #endif #include <netinet/sctp_os.h> @@ -2855,21 +2855,6 @@ sctp_inpcb_alloc(struct socket *so, uint32_t vrf_id) SCTP_INP_INFO_WUNLOCK(); return (ENOBUFS); } -#ifdef IPSEC -#if !(defined(__APPLE__)) - error = ipsec_init_policy(so, &inp->ip_inp.inp.inp_sp); -#else - error = 0; -#endif - if (error != 0) { -#if defined(__FreeBSD__) - crfree(inp->ip_inp.inp.inp_cred); -#endif - SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_ep), inp); - SCTP_INP_INFO_WUNLOCK(); - return error; - } -#endif /* IPSEC */ SCTP_INCR_EP_COUNT(); inp->ip_inp.inp.inp_ip_ttl = MODULE_GLOBAL(ip_defttl); SCTP_INP_INFO_WUNLOCK(); @@ -2912,9 +2897,6 @@ sctp_inpcb_alloc(struct socket *so, uint32_t vrf_id) so->so_pcb = NULL; #if defined(__FreeBSD__) crfree(inp->ip_inp.inp.inp_cred); -#ifdef IPSEC - ipsec_delete_pcbpolicy(&inp->ip_inp.inp); -#endif #endif SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_ep), inp); return (EOPNOTSUPP); @@ -2937,9 +2919,6 @@ sctp_inpcb_alloc(struct socket *so, uint32_t vrf_id) so->so_pcb = NULL; #if defined(__FreeBSD__) crfree(inp->ip_inp.inp.inp_cred); -#ifdef IPSEC - ipsec_delete_pcbpolicy(&inp->ip_inp.inp); -#endif #endif SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_ep), inp); return (ENOBUFS); @@ -2954,9 +2933,6 @@ sctp_inpcb_alloc(struct socket *so, uint32_t vrf_id) SCTP_HASH_FREE(inp->sctp_tcbhash, inp->sctp_hashmark); #if defined(__FreeBSD__) crfree(inp->ip_inp.inp.inp_cred); -#ifdef IPSEC - ipsec_delete_pcbpolicy(&inp->ip_inp.inp); -#endif #endif SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_ep), inp); return (ENOBUFS); @@ -2976,12 +2952,6 @@ sctp_inpcb_alloc(struct socket *so, uint32_t vrf_id) #endif SCTP_HASH_FREE(inp->sctp_tcbhash, inp->sctp_hashmark); so->so_pcb = NULL; -#if defined(__FreeBSD__) - crfree(inp->ip_inp.inp.inp_cred); -#ifdef IPSEC - ipsec_delete_pcbpolicy(&inp->ip_inp.inp); -#endif -#endif SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_ep), inp); SCTP_UNLOCK_EXC(SCTP_BASE_INFO(sctbinfo).ipi_lock); SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PCB, ENOMEM); @@ -4271,9 +4241,6 @@ sctp_inpcb_free(struct sctp_inpcb *inp, int immediate, int from) * macro here since le_next will get freed as part of the * sctp_free_assoc() call. */ -#ifdef IPSEC - ipsec_delete_pcbpolicy(ip_pcb); -#endif #ifndef __Panda__ if (ip_pcb->inp_options) { (void)sctp_m_free(ip_pcb->inp_options); @@ -6845,7 +6812,7 @@ sctp_pcb_init() TAILQ_INIT(&SCTP_BASE_INFO(callqueue)); #endif #if defined(__Userspace__) - mbuf_initialize(NULL); + mbuf_init(NULL); atomic_init(); #if defined(INET) || defined(INET6) recv_thread_init(); diff --git a/usrsctplib/netinet6/sctp6_usrreq.c b/usrsctplib/netinet6/sctp6_usrreq.c index faa7d47b..908a769e 100644 --- a/usrsctplib/netinet6/sctp6_usrreq.c +++ b/usrsctplib/netinet6/sctp6_usrreq.c @@ -32,7 +32,7 @@ #ifdef __FreeBSD__ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: head/sys/netinet6/sctp6_usrreq.c 310590 2016-12-26 11:06:41Z tuexen $"); +__FBSDID("$FreeBSD: head/sys/netinet6/sctp6_usrreq.c 313330 2017-02-06 08:49:57Z ae $"); #endif #include <netinet/sctp_os.h> @@ -64,11 +64,6 @@ __FBSDID("$FreeBSD: head/sys/netinet6/sctp6_usrreq.c 310590 2016-12-26 11:06:41Z #if defined(__APPLE__) #define APPLE_FILE_NO 9 #endif -#ifdef IPSEC -#include <netipsec/ipsec.h> -#include <netipsec/ipsec6.h> -#endif /* IPSEC */ - #if !defined(__Userspace__) extern struct protosw inetsw[]; #endif @@ -798,10 +793,6 @@ sctp6_attach(struct socket *so, int proto SCTP_UNUSED, struct proc *p SCTP_UNUSE */ inp6->inp_ip_ttl = MODULE_GLOBAL(ip_defttl); #endif - /* - * Hmm what about the IPSEC stuff that is missing here but in - * sctp_attach()? - */ SCTP_INP_WUNLOCK(inp); return (0); } |