app/testpmd: fix reply to a multicast ICMP request
authorIvan Boule <ivan.boule@6wind.com>
Thu, 28 May 2015 15:05:23 +0000 (17:05 +0200)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Fri, 12 Jun 2015 13:55:38 +0000 (15:55 +0200)
commit8443ce81935358111e078ade559c3c75cd5f7871
tree4dc6ad1767350fa6b45aaa14d21508eb93cf5d31
parentd4f891b5fc6d3a25d61adb6f3515de89034266fe
app/testpmd: fix reply to a multicast ICMP request

Set the IP source and destination addresses in the IP header of the
ICMP reply as follows:
  - Use the request IP source address as the reply IP destination address
  - If the request IP destination address is a multicast IP address
      - choose a reply IP source address different from the request IP
        source address,
      - re-compute the IP header checksum.
    Otherwise
      - switch the request IP source and destination addresses in the
        reply,
      - keep the IP header checksum unchanged.

Signed-off-by: Ivan Boule <ivan.boule@6wind.com>
app/test-pmd/icmpecho.c