net: Fix ARP requests error

Reason for error is ARP message redirected back to ethernet
instead of sending directly.

Call flow:
  ehternet_send()
    net_arp_prepare()
      net_send_data().. which again calls ethernet_send().

So below check is necessary in net_arp_prepare().
"if (ntohs(hdr->type) == NET_ETH_PTYPE_ARP)".

When same buffer used for Tx, it still contains garbage in link
layer header (which is uninitialized). But this check
assumes buffer is ARP and send it immediately.

So first fix is just queue the Tx buf with net_if_queue_tx.
Now only ethernet_send() will call net_arp_prepare(), means
input buffer for net_arp_prepare is not ARP at all. So the check
is not necessary.

Jira: ZEP-1036

Change-Id: I86eaba5ffaa9cabfe43e643b17fa0f9171c4c521
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
1 file changed