In tcp_dooptions() skip over SACK options if it is a SYN segment.

This commit is contained in:
Andre Oppermann 2007-04-04 14:39:49 +00:00
parent adde36d27a
commit b728e90260
2 changed files with 4 additions and 0 deletions

View File

@ -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;

View File

@ -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;