Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/tcp_subr.c
Show First 20 Lines • Show All 1,630 Lines • ▼ Show 20 Lines | if (to.to_flags & TOF_SIGNATURE) { | ||||
if (!TCPMD5_ENABLED() || | if (!TCPMD5_ENABLED() || | ||||
TCPMD5_OUTPUT(m, nth, to.to_signature) != 0) { | TCPMD5_OUTPUT(m, nth, to.to_signature) != 0) { | ||||
m_freem(m); | m_freem(m); | ||||
return; | return; | ||||
} | } | ||||
} | } | ||||
#endif | #endif | ||||
/* | |||||
* Send out control packets with same IP ECN header | |||||
* bits, as when an established or listening socket | |||||
* would exist. | |||||
*/ | |||||
if ((V_tcp_do_ecn == 1) && V_tcp_ecn_generalized) { | |||||
#ifdef INET6 | |||||
if (isipv6) { | |||||
ip6->ip6_flow |= htonl(IPTOS_ECN_ECT0 << 20); | |||||
} | |||||
#endif /* INET6 */ | |||||
#if defined(INET6) && defined(INET) | |||||
else | |||||
#endif | |||||
#ifdef INET | |||||
{ | |||||
ip->ip_tos |= IPTOS_ECN_ECT0; | |||||
} | |||||
#endif /* INET */ | |||||
} | |||||
m->m_pkthdr.csum_data = offsetof(struct tcphdr, th_sum); | m->m_pkthdr.csum_data = offsetof(struct tcphdr, th_sum); | ||||
#ifdef INET6 | #ifdef INET6 | ||||
if (isipv6) { | if (isipv6) { | ||||
m->m_pkthdr.csum_flags = CSUM_TCP_IPV6; | m->m_pkthdr.csum_flags = CSUM_TCP_IPV6; | ||||
nth->th_sum = in6_cksum_pseudo(ip6, | nth->th_sum = in6_cksum_pseudo(ip6, | ||||
tlen - sizeof(struct ip6_hdr), IPPROTO_TCP, 0); | tlen - sizeof(struct ip6_hdr), IPPROTO_TCP, 0); | ||||
ip6->ip6_hlim = in6_selecthlim(tp != NULL ? tp->t_inpcb : | ip6->ip6_hlim = in6_selecthlim(tp != NULL ? tp->t_inpcb : | ||||
NULL, NULL); | NULL, NULL); | ||||
▲ Show 20 Lines • Show All 1,876 Lines • Show Last 20 Lines |