Fix TCP retransmission
This commit is contained in:
parent
4ebb4c616f
commit
440694e3d3
1 changed files with 5 additions and 3 deletions
|
@ -708,12 +708,14 @@ grub_net_recv_tcp_packet (struct grub_net_buff *nb,
|
||||||
for (unack = sock->unack_first; unack; unack = next)
|
for (unack = sock->unack_first; unack; unack = next)
|
||||||
{
|
{
|
||||||
grub_uint32_t seqnr;
|
grub_uint32_t seqnr;
|
||||||
|
struct tcphdr *unack_tcph;
|
||||||
next = unack->next;
|
next = unack->next;
|
||||||
seqnr = grub_be_to_cpu32 (((struct tcphdr *) unack->nb->data)
|
seqnr = grub_be_to_cpu32 (((struct tcphdr *) unack->nb->data)
|
||||||
->seqnr);
|
->seqnr);
|
||||||
seqnr += (nb->tail - nb->data
|
unack_tcph = (struct tcphdr *) unack->nb->data;
|
||||||
- (grub_be_to_cpu16 (tcph->flags) >> 12) * 4);
|
seqnr += (unack->nb->tail - unack->nb->data
|
||||||
if (grub_be_to_cpu16 (tcph->flags) & TCP_FIN)
|
- (grub_be_to_cpu16 (unack_tcph->flags) >> 12) * 4);
|
||||||
|
if (grub_be_to_cpu16 (unack_tcph->flags) & TCP_FIN)
|
||||||
seqnr++;
|
seqnr++;
|
||||||
|
|
||||||
if (seqnr > acked)
|
if (seqnr > acked)
|
||||||
|
|
Loading…
Reference in a new issue