mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-11-07 04:36:52 -10:00
tcp md5: improve handling of tcps_sig_err_sigopt counter
For non listening TCP endpoints, increment the tcps_sig_err_sigopt counter when TCP MD5 is not enabled in the TCP connection, but a segment containing a TCP MD5 option is received. Also increment the counter when using the RACK or BBR stack. Reported by: Hannes Elfert Reviewed by: rrs MFC after: 1 week MFC to: stable/14 MFC to: stable/15 Differential Revision: https://reviews.freebsd.org/D59249
This commit is contained in:
1 parent
46cf612d98
commit
c6ae11c1b0
3 files changed
+12
-4
No files matched your search
@@ -1579,11 +1579,9 @@ tcp_do_segment(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th,
|
||||
to.to_flags &= ~TOF_SACK;
|
||||
}
|
||||
#if defined(IPSEC_SUPPORT) || defined(TCP_SIGNATURE)
|
||||
if ((tp->t_flags & TF_SIGNATURE) != 0 &&
|
||||
(to.to_flags & TOF_SIGNATURE) == 0) {
|
||||
if ((tp->t_flags & TF_SIGNATURE) == 0 &&
|
||||
(to.to_flags & TOF_SIGNATURE) != 0)
|
||||
TCPSTAT_INC(tcps_sig_err_sigopt);
|
||||
/* XXX: should drop? */
|
||||
}
|
||||
#endif
|
||||
/*
|
||||
* If echoed timestamp is later than the current time,
|
||||
|
||||
@@ -11349,6 +11349,11 @@ bbr_do_segment_nounlock(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th,
|
||||
*/
|
||||
to.to_flags &= ~TOF_SACK;
|
||||
}
|
||||
#if defined(IPSEC_SUPPORT) || defined(TCP_SIGNATURE)
|
||||
if ((tp->t_flags & TF_SIGNATURE) == 0 &&
|
||||
(to.to_flags & TOF_SIGNATURE) != 0)
|
||||
KMOD_TCPSTAT_INC(tcps_sig_err_sigopt);
|
||||
#endif
|
||||
/*
|
||||
* If timestamps were negotiated during SYN/ACK and a
|
||||
* segment without a timestamp is received, silently drop
|
||||
|
||||
@@ -16401,6 +16401,11 @@ rack_do_segment_nounlock(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th,
|
||||
*/
|
||||
to.to_flags &= ~TOF_SACK;
|
||||
}
|
||||
#if defined(IPSEC_SUPPORT) || defined(TCP_SIGNATURE)
|
||||
if ((tp->t_flags & TF_SIGNATURE) == 0 &&
|
||||
(to.to_flags & TOF_SIGNATURE) != 0)
|
||||
KMOD_TCPSTAT_INC(tcps_sig_err_sigopt);
|
||||
#endif
|
||||
if ((tp->t_state >= TCPS_FIN_WAIT_1) &&
|
||||
(tp->t_flags & TF_GPUTINPROG)) {
|
||||
/*
|
||||
|
||||
Reference in new issue
Block a user