mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
In tcp_dooptions() skip over SACK options if it is a SYN segment.
This commit is contained in:
parent
adde36d27a
commit
b728e90260
2 changed files with 4 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue