DPDK patches and discussions
 help / color / mirror / Atom feed
From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH 1/2] app/testpmd: use correct hardware address in ARP replies
Date: Fri, 22 May 2015 13:07:31 +0200	[thread overview]
Message-ID: <1432292852-15701-1-git-send-email-adrien.mazarguil@6wind.com> (raw)

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>
---
 app/test-pmd/icmpecho.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test-pmd/icmpecho.c b/app/test-pmd/icmpecho.c
index 010c5a9..c5933f4 100644
--- a/app/test-pmd/icmpecho.c
+++ b/app/test-pmd/icmpecho.c
@@ -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;
-- 
2.1.0

             reply	other threads:[~2015-05-22 11:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-22 11:07 Adrien Mazarguil [this message]
2015-05-22 11:07 ` [dpdk-dev] [PATCH 2/2] app/testpmd: compute checksum in icmpecho replies Adrien Mazarguil
2015-05-22 12:42   ` Olivier MATZ
2015-05-22 13:34     ` Adrien Mazarguil
2015-05-22 17:03   ` [dpdk-dev] [PATCH v2] " Adrien Mazarguil
     [not found]     ` <55630A3E.5080708@6wind.com>
2015-05-29 16:12       ` Thomas Monjalon
2015-05-29 16:11 ` [dpdk-dev] [PATCH 1/2] app/testpmd: use correct hardware address in ARP replies Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1432292852-15701-1-git-send-email-adrien.mazarguil@6wind.com \
    --to=adrien.mazarguil@6wind.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).