diff options
-rw-r--r-- | sys/netinet/tcp_input.c | 2 | ||||
-rw-r--r-- | sys/netinet/tcp_reass.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index e37b656..5277c46 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -2748,6 +2748,8 @@ tcp_dooptions(struct tcpopt *to, u_char *cp, int cnt, int flags) case TCPOPT_SACK: if (optlen <= 2 || (optlen - 2) % TCPOLEN_SACK != 0) continue; + if (flags & TO_SYN) + continue; to->to_flags |= TOF_SACK; to->to_nsacks = (optlen - 2) / TCPOLEN_SACK; to->to_sacks = cp + 2; diff --git a/sys/netinet/tcp_reass.c b/sys/netinet/tcp_reass.c index e37b656..5277c46 100644 --- a/sys/netinet/tcp_reass.c +++ b/sys/netinet/tcp_reass.c @@ -2748,6 +2748,8 @@ tcp_dooptions(struct tcpopt *to, u_char *cp, int cnt, int flags) case TCPOPT_SACK: if (optlen <= 2 || (optlen - 2) % TCPOLEN_SACK != 0) continue; + if (flags & TO_SYN) + continue; to->to_flags |= TOF_SACK; to->to_nsacks = (optlen - 2) / TCPOLEN_SACK; to->to_sacks = cp + 2; |