Changeset View
Changeset View
Standalone View
Standalone View
head/sys/netinet/sctp_input.c
Show First 20 Lines • Show All 5,784 Lines • ▼ Show 20 Lines | if (ch->chunk_type != SCTP_ABORT_ASSOCIATION) { | ||||
mflowtype, mflowid, fibnum, | mflowtype, mflowid, fibnum, | ||||
vrf_id, port); | vrf_id, port); | ||||
} | } | ||||
} | } | ||||
goto out; | goto out; | ||||
} else if (stcb == NULL) { | } else if (stcb == NULL) { | ||||
inp_decr = inp; | inp_decr = inp; | ||||
} | } | ||||
#if defined(IPSEC) || defined(IPSEC_SUPPORT) | |||||
/*- | |||||
* 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 (IPSEC_ENABLED(ipv4)) { | |||||
if (IPSEC_CHECK_POLICY(ipv4, m, | |||||
&inp->ip_inp.inp) != 0) { | |||||
SCTP_STAT_INCR(sctps_hdrops); | |||||
goto out; | |||||
} | |||||
} | |||||
break; | |||||
#endif | |||||
#ifdef INET6 | |||||
case AF_INET6: | |||||
if (IPSEC_ENABLED(ipv6)) { | |||||
if (IPSEC_CHECK_POLICY(ipv6, m, | |||||
&inp->ip_inp.inp) != 0) { | |||||
SCTP_STAT_INCR(sctps_hdrops); | |||||
goto out; | |||||
} | |||||
} | |||||
break; | |||||
#endif | |||||
default: | |||||
break; | |||||
} | |||||
} | |||||
#endif /* IPSEC */ | |||||
SCTPDBG(SCTP_DEBUG_INPUT1, "Ok, Common input processing called, m:%p iphlen:%d offset:%d length:%d stcb:%p\n", | 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); | (void *)m, iphlen, offset, length, (void *)stcb); | ||||
if (stcb) { | if (stcb) { | ||||
/* always clear this before beginning a packet */ | /* always clear this before beginning a packet */ | ||||
stcb->asoc.authenticated = 0; | stcb->asoc.authenticated = 0; | ||||
stcb->asoc.seen_a_sack_this_pkt = 0; | stcb->asoc.seen_a_sack_this_pkt = 0; | ||||
SCTPDBG(SCTP_DEBUG_INPUT1, "stcb:%p state:%x\n", | SCTPDBG(SCTP_DEBUG_INPUT1, "stcb:%p state:%x\n", | ||||
(void *)stcb, stcb->asoc.state); | (void *)stcb, stcb->asoc.state); | ||||
▲ Show 20 Lines • Show All 409 Lines • Show Last 20 Lines |