mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-14 10:27:12 +08:00
Update to FreeBSD head 2018-04-01
Git mirror commit 8dfb1ccc26d1cea7e2529303003ff61f9f1784c4. Update #3472.
This commit is contained in:
@@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <netinet/ip.h>
|
||||
#include <netinet/ip_var.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <netinet/tcp_seq.h>
|
||||
#include <netinet/tcp_lro.h>
|
||||
#include <netinet/tcp_var.h>
|
||||
|
||||
@@ -796,7 +797,9 @@ tcp_lro_rx2(struct lro_ctrl *lc, struct mbuf *m, uint32_t csum, int use_hash)
|
||||
|
||||
/* Try to append the new segment. */
|
||||
if (__predict_false(seq != le->next_seq ||
|
||||
(tcp_data_len == 0 && le->ack_seq == th->th_ack))) {
|
||||
(tcp_data_len == 0 &&
|
||||
le->ack_seq == th->th_ack &&
|
||||
le->window == th->th_win))) {
|
||||
/* Out of order packet or duplicate ACK. */
|
||||
tcp_lro_active_remove(le);
|
||||
tcp_lro_flush(lc, le);
|
||||
@@ -813,12 +816,20 @@ tcp_lro_rx2(struct lro_ctrl *lc, struct mbuf *m, uint32_t csum, int use_hash)
|
||||
le->tsval = tsval;
|
||||
le->tsecr = *(ts_ptr + 2);
|
||||
}
|
||||
|
||||
le->next_seq += tcp_data_len;
|
||||
le->ack_seq = th->th_ack;
|
||||
le->window = th->th_win;
|
||||
le->append_cnt++;
|
||||
|
||||
if (tcp_data_len || SEQ_GT(ntohl(th->th_ack), ntohl(le->ack_seq))) {
|
||||
le->next_seq += tcp_data_len;
|
||||
le->ack_seq = th->th_ack;
|
||||
le->window = th->th_win;
|
||||
le->append_cnt++;
|
||||
} else if (th->th_ack == le->ack_seq) {
|
||||
le->window = WIN_MAX(le->window, th->th_win);
|
||||
le->append_cnt++;
|
||||
} else {
|
||||
/* no data and old ack */
|
||||
le->append_cnt++;
|
||||
m_freem(m);
|
||||
return (0);
|
||||
}
|
||||
#ifdef TCP_LRO_UPDATE_CSUM
|
||||
le->ulp_csum += tcp_lro_rx_csum_fixup(le, l3hdr, th,
|
||||
tcp_data_len, ~csum);
|
||||
|
Reference in New Issue
Block a user