Commit e79565ef authored by danielinux's avatar danielinux

Fixed bug in RAW and ICMP recvfrom

parent cf216953
......@@ -103,6 +103,8 @@ int pico_socket_icmp4_recvfrom(struct pico_socket *s, void *buf, int len, void *
{
struct pico_frame *f;
f = pico_dequeue(&s->q_in);
if (!f)
return 0;
if (f->transport_len < len) {
len = f->transport_len;
}
......
......@@ -423,6 +423,8 @@ int pico_socket_ipv4_recvfrom(struct pico_socket *s, void *buf, int len, void *o
{
struct pico_frame *f;
f = pico_dequeue(&s->q_in);
if (!f)
return 0;
if (f->transport_len < len) {
len = f->transport_len;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment