diff options
author | Christian Ehrhardt <christian.ehrhardt@canonical.com> | 2019-02-26 09:17:37 +0100 |
---|---|---|
committer | Christian Ehrhardt <christian.ehrhardt@canonical.com> | 2019-02-26 09:21:27 +0100 |
commit | 597cb1874068054d4c0be41f161a72ef37888930 (patch) | |
tree | 8899c19634bd8e393a8eac05f33925e4d75bd77d /lib/librte_gro/gro_tcp4.c | |
parent | 6e7cbd63706f3435b9d9a2057a37db1da01db9a7 (diff) |
New upstream version 17.11.5upstream-17.11-stable
Change-Id: I8d2aa1aee2a9a78614dff5a01008f91e88e810c7
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Diffstat (limited to 'lib/librte_gro/gro_tcp4.c')
-rw-r--r-- | lib/librte_gro/gro_tcp4.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/librte_gro/gro_tcp4.c b/lib/librte_gro/gro_tcp4.c index 61a04232..d1c6c7de 100644 --- a/lib/librte_gro/gro_tcp4.c +++ b/lib/librte_gro/gro_tcp4.c @@ -343,7 +343,8 @@ gro_tcp4_reassemble(struct rte_mbuf *pkt, struct ipv4_hdr *ipv4_hdr; struct tcp_hdr *tcp_hdr; uint32_t sent_seq; - uint16_t tcp_dl, ip_id; + uint16_t ip_id; + int32_t tcp_dl; struct tcp4_key key; uint32_t cur_idx, prev_idx, item_idx; @@ -360,10 +361,10 @@ gro_tcp4_reassemble(struct rte_mbuf *pkt, */ if (tcp_hdr->tcp_flags != TCP_ACK_FLAG) return -1; - /* if payload length is 0, return immediately */ + /* if payload length is less than or equal to 0, return immediately */ tcp_dl = rte_be_to_cpu_16(ipv4_hdr->total_length) - pkt->l3_len - pkt->l4_len; - if (tcp_dl == 0) + if (tcp_dl <= 0) return -1; ip_id = rte_be_to_cpu_16(ipv4_hdr->packet_id); |