Adopt new IPv4/IPv6 device path for network modules.

Signed-off-by: tye
Reviewed-by: niruiyu

Adopt SasEx and new IPv6 device path for DevicePathDxe driver.
Signed-off-by: niruiyu
Reviewed-by: erictian

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12574 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
niruiyu
2011-10-26 09:29:46 +00:00
parent 8f5e3a12a9
commit 501793fad4
13 changed files with 291 additions and 20 deletions

View File

@@ -1287,11 +1287,25 @@ IScsiGetTcpConnDevicePath (
if (DevicePathType (&DPathNode->DevPath) == MESSAGING_DEVICE_PATH) {
if (!Conn->Ipv6Flag && DevicePathSubType (&DPathNode->DevPath) == MSG_IPv4_DP) {
DPathNode->Ipv4.LocalPort = 0;
DPathNode->Ipv4.StaticIpAddress = (BOOLEAN) !Session->ConfigData->SessionConfigData.InitiatorInfoFromDhcp;
DPathNode->Ipv4.StaticIpAddress =
(BOOLEAN) (!Session->ConfigData->SessionConfigData.InitiatorInfoFromDhcp);
IP4_COPY_ADDRESS (
&DPathNode->Ipv4.GatewayIpAddress,
&Session->ConfigData->SessionConfigData.Gateway
);
IP4_COPY_ADDRESS (
&DPathNode->Ipv4.SubnetMask,
&Session->ConfigData->SessionConfigData.SubnetMask
);
break;
} else if (Conn->Ipv6Flag && DevicePathSubType (&DPathNode->DevPath) == MSG_IPv6_DP) {
DPathNode->Ipv6.LocalPort = 0;
DPathNode->Ipv6.StaticIpAddress = (BOOLEAN) !Session->ConfigData->SessionConfigData.InitiatorInfoFromDhcp;
DPathNode->Ipv6.IpAddressOrigin = 0;
DPathNode->Ipv6.PrefixLength = IP6_PREFIX_LENGTH;
ZeroMem (&DPathNode->Ipv6.GatewayIpAddress, sizeof (EFI_IPv6_ADDRESS));
break;
}
}