Jiaxin Wu
2015-07-13 03:39:14 UTC
Fix ping IPv6 stack usage mode failure issue and also
update its the help info.
Verified command:
*ping -?
*Ping -_ip6 -_s 2000:bbbnb::12 2000:bbbb::8
Cc:Jaben Carsey <***@intel.com>
Cc:Shumin Qiu <***@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <***@intel.com>
---
.../Library/UefiShellNetwork1CommandsLib/Ping.c | 7 +------
.../UefiShellNetwork1CommandsLib.uni | Bin 20078 -> 20910 bytes
2 files changed, 1 insertion(+), 6 deletions(-)
diff --git a/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ping.c b/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ping.c
index fda062d..643be23 100644
--- a/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ping.c
+++ b/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ping.c
@@ -597,10 +597,11 @@ PingGenerateToken (
// Assembly echo request packet.
//
Request->Type = (UINT8)(Private->IpChoice==PING_IP_CHOICE_IP6?ICMP_V6_ECHO_REQUEST:ICMP_V4_ECHO_REQUEST);
Request->Code = 0;
Request->SequenceNum = SequenceNum;
+ Request->TimeStamp = TimeStamp;
Request->Identifier = 0;
Request->Checksum = 0;
//
// Assembly token for transmit.
@@ -625,11 +626,10 @@ PingGenerateToken (
((EFI_IP4_TRANSMIT_DATA*)TxData)->DestinationAddress.Addr[1] = Private->DstAddress[1];
((EFI_IP4_TRANSMIT_DATA*)TxData)->DestinationAddress.Addr[2] = Private->DstAddress[2];
((EFI_IP4_TRANSMIT_DATA*)TxData)->DestinationAddress.Addr[3] = Private->DstAddress[3];
HeadSum = NetChecksum ((UINT8 *) Request, Private->BufferSize);
- Request->TimeStamp = TimeStamp;
TempChecksum = NetChecksum ((UINT8 *) &Request->TimeStamp, sizeof (UINT64));
Request->Checksum = (UINT16)(~NetAddChecksum (HeadSum, TempChecksum));
}
@@ -802,15 +802,10 @@ Ping6OnTimerRoutine (
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_PING_TIMEOUT), gShellNetwork1HiiHandle, TxInfo->SequenceNum);
RemoveEntryList (&TxInfo->Link);
PingDestroyTxInfo (TxInfo, Private->IpChoice);
- //
- // We dont need to wait for this some other time...
- //
- Private->RxCount++;
-
if (IsListEmpty (&Private->TxList) && (Private->TxCount == Private->SendNum)) {
//
// All the left icmp6 echo request in the list timeout.
//
Private->Status = EFI_TIMEOUT;
diff --git a/ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.uni b/ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.uni
index 1971ebc5f69c0e7de6ef2252de0428ac75bfaaaf..7cc7b7d672246a62ef97a8b002a780003d3da330 100644
GIT binary patch
delta 466
zcmaDihjHCv#tj*Ug82+Z3<?aM3;_&f3}!%9@#JnB+sVre-FQ)CCO5jsPj0Z|***@HuA
z#Gc7e08|^h+0*DJBP*CQdA)<aHCQ`C2}***@7GD9}ds8WVvAUmBQ70AwI$Y)3avosi7
zfOHyArj#KEs9J#`6KLsuLvcpU$@cb=lO0Ur(5#+ql8h$u(M@<VpJ@$NQNGE$4EZK+
zGd%$Jnlpnh#CwyA&D<v+vXBr}U~pw{X7FI}XNYGA0<***@bd>A4(KR0t^nrvVsG}*zz
zL9hVm$Yh|?(ikd%WFABMWI<EO$#o`rlaoBfCO<HjV~z(p`?rNGqY;qQh3Rv}&<FHj
z2}1_h>qw!DKbR&bdWwVWP>cuK4GL=o1|tRoFtlPwf<h|>D+Y_njOLP?4J_?M0lc+t
A0RR91
delta 120
zcmZ3tnDN~l#tj*Uli!(eO}=7pGI^V!8<>60U1;(FM~=w`MoycXj6N_<7BP*Pe9MY&
za-V6?<O{w6lgw%$6yM}I)_jw9m>rnhW9}lVz~IW@%;3S`&k)ZL1Y`#=_%***@N
Q`JcH16UfBP1vYk~0Ao%pA^-pY
update its the help info.
Verified command:
*ping -?
*Ping -_ip6 -_s 2000:bbbnb::12 2000:bbbb::8
Cc:Jaben Carsey <***@intel.com>
Cc:Shumin Qiu <***@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <***@intel.com>
---
.../Library/UefiShellNetwork1CommandsLib/Ping.c | 7 +------
.../UefiShellNetwork1CommandsLib.uni | Bin 20078 -> 20910 bytes
2 files changed, 1 insertion(+), 6 deletions(-)
diff --git a/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ping.c b/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ping.c
index fda062d..643be23 100644
--- a/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ping.c
+++ b/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ping.c
@@ -597,10 +597,11 @@ PingGenerateToken (
// Assembly echo request packet.
//
Request->Type = (UINT8)(Private->IpChoice==PING_IP_CHOICE_IP6?ICMP_V6_ECHO_REQUEST:ICMP_V4_ECHO_REQUEST);
Request->Code = 0;
Request->SequenceNum = SequenceNum;
+ Request->TimeStamp = TimeStamp;
Request->Identifier = 0;
Request->Checksum = 0;
//
// Assembly token for transmit.
@@ -625,11 +626,10 @@ PingGenerateToken (
((EFI_IP4_TRANSMIT_DATA*)TxData)->DestinationAddress.Addr[1] = Private->DstAddress[1];
((EFI_IP4_TRANSMIT_DATA*)TxData)->DestinationAddress.Addr[2] = Private->DstAddress[2];
((EFI_IP4_TRANSMIT_DATA*)TxData)->DestinationAddress.Addr[3] = Private->DstAddress[3];
HeadSum = NetChecksum ((UINT8 *) Request, Private->BufferSize);
- Request->TimeStamp = TimeStamp;
TempChecksum = NetChecksum ((UINT8 *) &Request->TimeStamp, sizeof (UINT64));
Request->Checksum = (UINT16)(~NetAddChecksum (HeadSum, TempChecksum));
}
@@ -802,15 +802,10 @@ Ping6OnTimerRoutine (
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_PING_TIMEOUT), gShellNetwork1HiiHandle, TxInfo->SequenceNum);
RemoveEntryList (&TxInfo->Link);
PingDestroyTxInfo (TxInfo, Private->IpChoice);
- //
- // We dont need to wait for this some other time...
- //
- Private->RxCount++;
-
if (IsListEmpty (&Private->TxList) && (Private->TxCount == Private->SendNum)) {
//
// All the left icmp6 echo request in the list timeout.
//
Private->Status = EFI_TIMEOUT;
diff --git a/ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.uni b/ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.uni
index 1971ebc5f69c0e7de6ef2252de0428ac75bfaaaf..7cc7b7d672246a62ef97a8b002a780003d3da330 100644
GIT binary patch
delta 466
zcmaDihjHCv#tj*Ug82+Z3<?aM3;_&f3}!%9@#JnB+sVre-FQ)CCO5jsPj0Z|***@HuA
z#Gc7e08|^h+0*DJBP*CQdA)<aHCQ`C2}***@7GD9}ds8WVvAUmBQ70AwI$Y)3avosi7
zfOHyArj#KEs9J#`6KLsuLvcpU$@cb=lO0Ur(5#+ql8h$u(M@<VpJ@$NQNGE$4EZK+
zGd%$Jnlpnh#CwyA&D<v+vXBr}U~pw{X7FI}XNYGA0<***@bd>A4(KR0t^nrvVsG}*zz
zL9hVm$Yh|?(ikd%WFABMWI<EO$#o`rlaoBfCO<HjV~z(p`?rNGqY;qQh3Rv}&<FHj
z2}1_h>qw!DKbR&bdWwVWP>cuK4GL=o1|tRoFtlPwf<h|>D+Y_njOLP?4J_?M0lc+t
A0RR91
delta 120
zcmZ3tnDN~l#tj*Uli!(eO}=7pGI^V!8<>60U1;(FM~=w`MoycXj6N_<7BP*Pe9MY&
za-V6?<O{w6lgw%$6yM}I)_jw9m>rnhW9}lVz~IW@%;3S`&k)ZL1Y`#=_%***@N
Q`JcH16UfBP1vYk~0Ao%pA^-pY
--
1.9.5.msysgit.1
1.9.5.msysgit.1