diff --git a/sys/netinet/tcp_lro.h b/sys/netinet/tcp_lro.h --- a/sys/netinet/tcp_lro.h +++ b/sys/netinet/tcp_lro.h @@ -146,8 +146,9 @@ uint16_t compressed; uint16_t uncompressed; uint16_t window; - uint16_t timestamp : 1; - uint16_t needs_merge : 1; + uint8_t flags; + uint8_t timestamp : 1; + uint8_t needs_merge : 1; struct bintime alloc_time; /* time when entry was allocated */ }; diff --git a/sys/netinet/tcp_lro.c b/sys/netinet/tcp_lro.c --- a/sys/netinet/tcp_lro.c +++ b/sys/netinet/tcp_lro.c @@ -921,6 +921,7 @@ le->next_seq = ntohl(th->th_seq) + tcp_data_len; le->ack_seq = th->th_ack; le->window = th->th_win; + le->flags = th->th_flags; le->needs_merge = 0; /* Setup new data pointers. */ @@ -1092,10 +1093,12 @@ } /* Try to append the new segment. */ if (__predict_false(ntohl(th->th_seq) != le->next_seq || + ((th->th_flags & TH_ACK) != + (le->flags & TH_ACK)) || (tcp_data_len == 0 && le->ack_seq == th->th_ack && le->window == th->th_win))) { - /* Out of order packet or duplicate ACK. */ + /* Out of order packet, non-ACK + ACK or dup ACK. */ tcp_push_and_replace(lc, le, m); goto again; }