Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/tcp_stacks/rack.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
Show First 20 Lines • Show All 11,673 Lines • ▼ Show 20 Lines | return (__ctf_process_rst(m, th, so, tp, | ||||
&rack->r_ctl.challenge_ack_ts, | &rack->r_ctl.challenge_ack_ts, | ||||
&rack->r_ctl.challenge_ack_cnt)); | &rack->r_ctl.challenge_ack_cnt)); | ||||
/* | /* | ||||
* RFC5961 Section 4.2 Send challenge ACK for any SYN in | * RFC5961 Section 4.2 Send challenge ACK for any SYN in | ||||
* synchronized state. | * synchronized state. | ||||
*/ | */ | ||||
if (thflags & TH_SYN) { | if (thflags & TH_SYN) { | ||||
ctf_challenge_ack(m, th, tp, &ret_val); | ctf_challenge_ack(m, th, tp, iptos, &ret_val); | ||||
return (ret_val); | return (ret_val); | ||||
} | } | ||||
/* | /* | ||||
* RFC 1323 PAWS: If we have a timestamp reply on this segment and | * RFC 1323 PAWS: If we have a timestamp reply on this segment and | ||||
* it's less than ts_recent, drop it. | * it's less than ts_recent, drop it. | ||||
*/ | */ | ||||
if ((to->to_flags & TOF_TS) != 0 && tp->ts_recent && | if ((to->to_flags & TOF_TS) != 0 && tp->ts_recent && | ||||
TSTMP_LT(to->to_tsval, tp->ts_recent)) { | TSTMP_LT(to->to_tsval, tp->ts_recent)) { | ||||
▲ Show 20 Lines • Show All 83 Lines • ▼ Show 20 Lines | if ((thflags & TH_RST) || | ||||
return (__ctf_process_rst(m, th, so, tp, | return (__ctf_process_rst(m, th, so, tp, | ||||
&rack->r_ctl.challenge_ack_ts, | &rack->r_ctl.challenge_ack_ts, | ||||
&rack->r_ctl.challenge_ack_cnt)); | &rack->r_ctl.challenge_ack_cnt)); | ||||
/* | /* | ||||
* RFC5961 Section 4.2 Send challenge ACK for any SYN in | * RFC5961 Section 4.2 Send challenge ACK for any SYN in | ||||
* synchronized state. | * synchronized state. | ||||
*/ | */ | ||||
if (thflags & TH_SYN) { | if (thflags & TH_SYN) { | ||||
ctf_challenge_ack(m, th, tp, &ret_val); | ctf_challenge_ack(m, th, tp, iptos, &ret_val); | ||||
return (ret_val); | return (ret_val); | ||||
} | } | ||||
/* | /* | ||||
* RFC 1323 PAWS: If we have a timestamp reply on this segment and | * RFC 1323 PAWS: If we have a timestamp reply on this segment and | ||||
* it's less than ts_recent, drop it. | * it's less than ts_recent, drop it. | ||||
*/ | */ | ||||
if ((to->to_flags & TOF_TS) != 0 && tp->ts_recent && | if ((to->to_flags & TOF_TS) != 0 && tp->ts_recent && | ||||
TSTMP_LT(to->to_tsval, tp->ts_recent)) { | TSTMP_LT(to->to_tsval, tp->ts_recent)) { | ||||
▲ Show 20 Lines • Show All 113 Lines • ▼ Show 20 Lines | if ((thflags & TH_RST) || | ||||
return (__ctf_process_rst(m, th, so, tp, | return (__ctf_process_rst(m, th, so, tp, | ||||
&rack->r_ctl.challenge_ack_ts, | &rack->r_ctl.challenge_ack_ts, | ||||
&rack->r_ctl.challenge_ack_cnt)); | &rack->r_ctl.challenge_ack_cnt)); | ||||
/* | /* | ||||
* RFC5961 Section 4.2 Send challenge ACK for any SYN in | * RFC5961 Section 4.2 Send challenge ACK for any SYN in | ||||
* synchronized state. | * synchronized state. | ||||
*/ | */ | ||||
if (thflags & TH_SYN) { | if (thflags & TH_SYN) { | ||||
ctf_challenge_ack(m, th, tp, &ret_val); | ctf_challenge_ack(m, th, tp, iptos, &ret_val); | ||||
return (ret_val); | return (ret_val); | ||||
} | } | ||||
/* | /* | ||||
* RFC 1323 PAWS: If we have a timestamp reply on this segment and | * RFC 1323 PAWS: If we have a timestamp reply on this segment and | ||||
* it's less than ts_recent, drop it. | * it's less than ts_recent, drop it. | ||||
*/ | */ | ||||
if ((to->to_flags & TOF_TS) != 0 && tp->ts_recent && | if ((to->to_flags & TOF_TS) != 0 && tp->ts_recent && | ||||
TSTMP_LT(to->to_tsval, tp->ts_recent)) { | TSTMP_LT(to->to_tsval, tp->ts_recent)) { | ||||
▲ Show 20 Lines • Show All 110 Lines • ▼ Show 20 Lines | if ((thflags & TH_RST) || | ||||
return (__ctf_process_rst(m, th, so, tp, | return (__ctf_process_rst(m, th, so, tp, | ||||
&rack->r_ctl.challenge_ack_ts, | &rack->r_ctl.challenge_ack_ts, | ||||
&rack->r_ctl.challenge_ack_cnt)); | &rack->r_ctl.challenge_ack_cnt)); | ||||
/* | /* | ||||
* RFC5961 Section 4.2 Send challenge ACK for any SYN in | * RFC5961 Section 4.2 Send challenge ACK for any SYN in | ||||
* synchronized state. | * synchronized state. | ||||
*/ | */ | ||||
if (thflags & TH_SYN) { | if (thflags & TH_SYN) { | ||||
ctf_challenge_ack(m, th, tp, &ret_val); | ctf_challenge_ack(m, th, tp, iptos, &ret_val); | ||||
return (ret_val); | return (ret_val); | ||||
} | } | ||||
/* | /* | ||||
* RFC 1323 PAWS: If we have a timestamp reply on this segment and | * RFC 1323 PAWS: If we have a timestamp reply on this segment and | ||||
* it's less than ts_recent, drop it. | * it's less than ts_recent, drop it. | ||||
*/ | */ | ||||
if ((to->to_flags & TOF_TS) != 0 && tp->ts_recent && | if ((to->to_flags & TOF_TS) != 0 && tp->ts_recent && | ||||
TSTMP_LT(to->to_tsval, tp->ts_recent)) { | TSTMP_LT(to->to_tsval, tp->ts_recent)) { | ||||
▲ Show 20 Lines • Show All 96 Lines • ▼ Show 20 Lines | if ((thflags & TH_RST) || | ||||
return (__ctf_process_rst(m, th, so, tp, | return (__ctf_process_rst(m, th, so, tp, | ||||
&rack->r_ctl.challenge_ack_ts, | &rack->r_ctl.challenge_ack_ts, | ||||
&rack->r_ctl.challenge_ack_cnt)); | &rack->r_ctl.challenge_ack_cnt)); | ||||
/* | /* | ||||
* RFC5961 Section 4.2 Send challenge ACK for any SYN in | * RFC5961 Section 4.2 Send challenge ACK for any SYN in | ||||
* synchronized state. | * synchronized state. | ||||
*/ | */ | ||||
if (thflags & TH_SYN) { | if (thflags & TH_SYN) { | ||||
ctf_challenge_ack(m, th, tp, &ret_val); | ctf_challenge_ack(m, th, tp, iptos, &ret_val); | ||||
return (ret_val); | return (ret_val); | ||||
} | } | ||||
/* | /* | ||||
* RFC 1323 PAWS: If we have a timestamp reply on this segment and | * RFC 1323 PAWS: If we have a timestamp reply on this segment and | ||||
* it's less than ts_recent, drop it. | * it's less than ts_recent, drop it. | ||||
*/ | */ | ||||
if ((to->to_flags & TOF_TS) != 0 && tp->ts_recent && | if ((to->to_flags & TOF_TS) != 0 && tp->ts_recent && | ||||
TSTMP_LT(to->to_tsval, tp->ts_recent)) { | TSTMP_LT(to->to_tsval, tp->ts_recent)) { | ||||
▲ Show 20 Lines • Show All 97 Lines • ▼ Show 20 Lines | if ((thflags & TH_RST) || | ||||
return (__ctf_process_rst(m, th, so, tp, | return (__ctf_process_rst(m, th, so, tp, | ||||
&rack->r_ctl.challenge_ack_ts, | &rack->r_ctl.challenge_ack_ts, | ||||
&rack->r_ctl.challenge_ack_cnt)); | &rack->r_ctl.challenge_ack_cnt)); | ||||
/* | /* | ||||
* RFC5961 Section 4.2 Send challenge ACK for any SYN in | * RFC5961 Section 4.2 Send challenge ACK for any SYN in | ||||
* synchronized state. | * synchronized state. | ||||
*/ | */ | ||||
if (thflags & TH_SYN) { | if (thflags & TH_SYN) { | ||||
ctf_challenge_ack(m, th, tp, &ret_val); | ctf_challenge_ack(m, th, tp, iptos, &ret_val); | ||||
return (ret_val); | return (ret_val); | ||||
} | } | ||||
/* | /* | ||||
* RFC 1323 PAWS: If we have a timestamp reply on this segment and | * RFC 1323 PAWS: If we have a timestamp reply on this segment and | ||||
* it's less than ts_recent, drop it. | * it's less than ts_recent, drop it. | ||||
*/ | */ | ||||
if ((to->to_flags & TOF_TS) != 0 && tp->ts_recent && | if ((to->to_flags & TOF_TS) != 0 && tp->ts_recent && | ||||
TSTMP_LT(to->to_tsval, tp->ts_recent)) { | TSTMP_LT(to->to_tsval, tp->ts_recent)) { | ||||
▲ Show 20 Lines • Show All 8,681 Lines • Show Last 20 Lines |