Commit a3330973 authored by Alessandro Rubini's avatar Alessandro Rubini

arch-bare-*: bugfix for packet receive

Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>

arch-bare-x86-64: bugfix for packet receive
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent bf9dbe63
......@@ -70,7 +70,8 @@ void bare_main_loop(struct pp_instance *ppi)
&ppi->last_rcv_time);
ppi->last_rcv_time.seconds += DSPRO(ppi)->currentUtcOffset;
if (((struct bare_ethhdr *)packet)->h_proto
/* we passed payload but it filled the ether header too */
if (((struct bare_ethhdr *)(packet + 2))->h_proto
!= htons(PP_ETHERTYPE))
goto again;
......
......@@ -70,7 +70,8 @@ void bare_main_loop(struct pp_instance *ppi)
&ppi->last_rcv_time);
ppi->last_rcv_time.seconds += DSPRO(ppi)->currentUtcOffset;
if (((struct bare_ethhdr *)packet)->h_proto
/* we passed payload but it filled the ether header too */
if (((struct bare_ethhdr *)(packet + 2))->h_proto
!= htons(PP_ETHERTYPE))
goto again;
......
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