app/testpmd: fix MAC address in ARP reply

In the icmpecho forwarding mode, ARP replies from testpmd contain
invalid zero-filled MAC addresses. This is broken since the commit below.

Fixes: 31db4d38de72 ("net: change arp header struct declaration")

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Ivan Boule <ivan.boule@6wind.com>
This commit is contained in:
Adrien Mazarguil 2015-05-22 13:07:31 +02:00 committed by Thomas Monjalon
parent 41ba94ca98
commit f161fb6ad5

View File

@ -400,7 +400,7 @@ reply_to_icmp_echo_rqsts(struct fwd_stream *fs)
arp_h->arp_op = rte_cpu_to_be_16(ARP_OP_REPLY);
ether_addr_copy(&arp_h->arp_data.arp_tha, &eth_addr);
ether_addr_copy(&arp_h->arp_data.arp_sha, &arp_h->arp_data.arp_tha);
ether_addr_copy(&eth_addr, &arp_h->arp_data.arp_sha);
ether_addr_copy(&eth_h->s_addr, &arp_h->arp_data.arp_sha);
/* Swap IP addresses in ARP payload */
ip_addr = arp_h->arp_data.arp_sip;