}\r
\r
//\r
- // Find out the gateway address which can route the message whcih send to ServerIp.\r
+ // Find out the gateway address which can route the message which send to ServerIp.\r
//\r
for (Index = 0; Index < Ip6ModeData.RouteCount; Index++) {\r
if (NetIp6IsNetEqual (&Private->ServerIp.v6, &Ip6ModeData.RouteTable[Index].Destination, Ip6ModeData.RouteTable[Index].PrefixLength)) {\r
EFI_STATUS Status;\r
UINT64 DadTriggerTime;\r
EFI_IP6_CONFIG_DUP_ADDR_DETECT_TRANSMITS DadXmits;\r
+ BOOLEAN NoGateway;\r
\r
Status = EFI_SUCCESS;\r
TimeOutEvt = NULL;\r
DataSize = sizeof (EFI_IP6_CONFIG_POLICY);\r
Ip6Cfg = Private->Ip6Cfg;\r
Ip6 = Private->Ip6;\r
+ NoGateway = FALSE;\r
\r
ZeroMem (&CfgAddr, sizeof (EFI_IP6_CONFIG_MANUAL_ADDRESS));\r
CopyMem (&CfgAddr.Address, Address, sizeof (EFI_IPv6_ADDRESS));\r
//\r
Status = PxeBcCheckRouteTable (Private, PXEBC_IP6_ROUTE_TABLE_TIMEOUT, &GatewayAddr);\r
if (EFI_ERROR (Status)) {\r
- goto ON_EXIT;\r
+ NoGateway = TRUE;\r
}\r
\r
//\r
//\r
// Set the default gateway address back if needed.\r
//\r
- if (!NetIp6IsUnspecifiedAddr (&GatewayAddr)) {\r
+ if (!NoGateway && !NetIp6IsUnspecifiedAddr (&GatewayAddr)) {\r
Status = Ip6Cfg->SetData (\r
Ip6Cfg,\r
Ip6ConfigDataTypeGateway,\r