Don't set RST in response to empty packets

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2011-10-05 17:50:52 +02:00
parent 4f71e077b9
commit 96bd62413f

View file

@ -764,11 +764,11 @@ grub_net_recv_tcp_packet (struct grub_net_buff *nb,
grub_netbuff_free (nb); grub_netbuff_free (nb);
return GRUB_ERR_NONE; return GRUB_ERR_NONE;
} }
if (sock->i_reseted) if (sock->i_reseted && (nb->tail - nb->data
- (grub_be_to_cpu16 (tcph->flags)
>> 12) * sizeof (grub_uint32_t)) > 0)
{ {
reset (sock); reset (sock);
grub_netbuff_free (nb);
return GRUB_ERR_NONE;
} }
err = grub_priority_queue_push (sock->pq, &nb); err = grub_priority_queue_push (sock->pq, &nb);