ShellPkg: Fix ping IPv6 stack usage mode failure issue
authorJiaxin Wu <jiaxin.wu@intel.com>
Tue, 14 Jul 2015 03:41:44 +0000 (03:41 +0000)
committerjiaxinwu <jiaxinwu@Edk2>
Tue, 14 Jul 2015 03:41:44 +0000 (03:41 +0000)
Fix ping IPv6 stack usage mode failure issue and also
update its the help info.
Verified command:
*ping -?
*Ping -_ip6 -_s 2000:bbbb::12 2000:bbbb::8

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17940 6f19259b-4bc3-4df7-8a09-765794883524

ShellPkg/Library/UefiShellNetwork1CommandsLib/Ping.c
ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.uni

index fda062de1d73c7d11019a239b563349881a442a8..643be2304fee453e548046df1b398efd85e27309 100644 (file)
@@ -599,6 +599,7 @@ PingGenerateToken (
   Request->Type        = (UINT8)(Private->IpChoice==PING_IP_CHOICE_IP6?ICMP_V6_ECHO_REQUEST:ICMP_V4_ECHO_REQUEST);\r
   Request->Code        = 0;\r
   Request->SequenceNum = SequenceNum;\r
+  Request->TimeStamp   = TimeStamp; \r
   Request->Identifier  = 0;\r
   Request->Checksum    = 0;\r
 \r
@@ -627,7 +628,6 @@ PingGenerateToken (
     ((EFI_IP4_TRANSMIT_DATA*)TxData)->DestinationAddress.Addr[3]      = Private->DstAddress[3];\r
 \r
     HeadSum = NetChecksum ((UINT8 *) Request, Private->BufferSize);\r
-    Request->TimeStamp   = TimeStamp;\r
     TempChecksum = NetChecksum ((UINT8 *) &Request->TimeStamp, sizeof (UINT64));\r
     Request->Checksum = (UINT16)(~NetAddChecksum (HeadSum, TempChecksum));\r
   }\r
@@ -804,11 +804,6 @@ Ping6OnTimerRoutine (
       RemoveEntryList (&TxInfo->Link);\r
       PingDestroyTxInfo (TxInfo, Private->IpChoice);\r
 \r
-      //\r
-      // We dont need to wait for this some other time...\r
-      //\r
-      Private->RxCount++;\r
-\r
       if (IsListEmpty (&Private->TxList) && (Private->TxCount == Private->SendNum)) {\r
         //\r
         // All the left icmp6 echo request in the list timeout.\r
index 1971ebc5f69c0e7de6ef2252de0428ac75bfaaaf..7cc7b7d672246a62ef97a8b002a780003d3da330 100644 (file)
Binary files a/ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.uni and b/ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.uni differ