summaryrefslogtreecommitdiffstats
path: root/NetworkPkg/IScsiDxe
Commit message (Collapse)AuthorAgeFilesLines
* NetworkPkg/IScsiDxe: Enhance the check for array boundaryShenglei Zhang2020-04-262-2/+2
| | | | | | | | | | | Array 'TargetUrl' of size 255 may use index value(s) 255 and 256. So enhance the boundary check to ensure the index is valid. Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Siyuan Fu <siyuan.fu@intel.com> Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
* NetworkPkg/IScsiDxe: Fix various typosAntoine Coeur2020-02-109-45/+45
| | | | | | | | | | | | | Fix various typos in comments and documentation. Cc: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Siyuan Fu <siyuan.fu@intel.com> Cc: Maciej Rabeda <maciej.rabeda@intel.com> Signed-off-by: Antoine Coeur <coeur@gmx.fr> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com> Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com> Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com> Message-Id: <20200207010831.9046-42-philmd@redhat.com>
* NetworkPkg: fix CloseProtocol & UninstallMultipleProtocolInterfaces callsLaszlo Ersek2019-10-091-1/+1
| | | | | | | | | | | | | | | | Both the "ControllerHandle" parameter of CloseProtocol() and the "Handle" parameter of UninstallMultipleProtocolInterfaces() have type EFI_HANDLE, not (EFI_HANDLE*). This patch fixes actual bugs. The issues have been dormant likely because they are on error paths. (Or, in case of TlsAuthConfigDxe, because the driver is unloaded likely very infrequently.) Cc: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Siyuan Fu <siyuan.fu@intel.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
* NetworkPkg: Replace BSD License with BSD+Patent LicenseMichael D Kinney2019-04-0929-203/+29
| | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=1373 Replace BSD 2-Clause License with BSD+Patent License. This change is based on the following emails: https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html RFCs with detailed process for the license change: V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
* NetworkPkg/IScsiDxe: Remove unnecessary NULL pointer check.Jiaxin Wu2019-01-231-5/+1
| | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1469 Since the value of AttemptConfigData is retrieved from the list Entry, it can't be the NULL pointer, so just remove the unnecessary check. Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Wu Hao A <hao.a.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Wu Hao A <hao.a.wu@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
* NetworkPkg/IScsiDxe: Remove unused global variables.Songpeng Li2019-01-151-2/+0
| | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1413 Global variables mIScsiDeviceListUpdated and mNumberOfIScsiDevices have never been used, this patch is to clean them. Cc: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Siyuan Fu <siyuan.fu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Songpeng Li <songpeng.li@intel.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
* NetworkPkg/IScsiDxe: Use UEFILib APIs to uninstall protocols.Ashish Singhal2019-01-101-20/+11
| | | | | | | | | | | | During cleanup in case of initialization failure, some driver bindings are not installed. Using abstractions in UEFILib takes care of it. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1428 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ashish Singhal <ashishsingha@nvidia.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
* NetworkPkg: Remove some clarification from IScsiDxe.infSiyuan Fu2018-12-241-10/+0
| | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1278 This patch is to remove the clarification about usage/difference between those drivers in MdeModulePkg and NetworkPkg, since the MdeModulePkg one have been deleted. Cc: Jiaxin Wu <jiaxin.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Siyuan Fu <siyuan.fu@intel.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
* NetworkPkg/IScsiDxe: add debug logs for failed SetVariable attemptsVijayenthiran Subramaniam2018-11-231-0/+8
| | | | | | | | | | Add debug messages for failed attempts to write to a variable. Cc: Siyuan Fu <siyuan.fu@intel.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Vijayenthiran Subramaniam <vijayenthiran.subramaniam@arm.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
* NetworkPkg/IScsiDxe: Add the clarification compared to IScsiDxe in MdeModulePkg.Jiaxin Wu2018-09-271-1/+11
| | | | | | | | | | | | | | Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1205 This patch is to add the driver usage/difference clarification compared to IScsiDxe in MdeModulePkg. Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* NetworkPkg: IScsiDxe: Remove the redundant code and definition.Songpeng Li2018-08-232-34/+0
| | | | | | | | | | | | | | The function IScsiFindTcbByITT that is never called have been removed. The definition gEfiAcpi20TableGuid has been removed. Cc: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Siyuan Fu <siyuan.fu@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1064 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Songpeng Li <songpeng.li@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
* NetworkPkg: Removing ipf which is no longer supported from edk2.chenc22018-08-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removing rules for Ipf sources file: * Remove the source file which path with "ipf" and also listed in [Sources.IPF] section of INF file. * Remove the source file which listed in [Components.IPF] section of DSC file and not listed in any other [Components] section. * Remove the embedded Ipf code for MDE_CPU_IPF. Removing rules for Inf file: * Remove IPF from VALID_ARCHITECTURES comments. * Remove DXE_SAL_DRIVER from LIBRARY_CLASS in [Defines] section. * Remove the INF which only listed in [Components.IPF] section in DSC. * Remove statements from [BuildOptions] that provide IPF specific flags. * Remove any IPF sepcific sections. Removing rules for Dec file: * Remove [Includes.IPF] section from Dec. Removing rules for Dsc file: * Remove IPF from SUPPORTED_ARCHITECTURES in [Defines] section of DSC. * Remove any IPF specific sections. * Remove statements from [BuildOptions] that provide IPF specific flags. Cc: Siyuan Fu <siyuan.fu@intel.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen <chen.a.chen@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
* NetworkPkg: Clean up source filesLiming Gao2018-06-2822-497/+497
| | | | | | | | | 1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com>
* NetworkPkg/IScsiDxe: Fix the ISCSI connection failure in certain case.Jiaxin Wu2018-03-131-1/+1
| | | | | | | | | | | | | | | The ISCSI connection will fail for the first time if the target info is retrieved from DHCP and expressed as URI format. The issue is caused by the missing DNS protocol dependency check during the driver support function. This patch is to fix the above issue. Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Ye Ting <ting.ye@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
* NetworkPkg/IScsiDxe: Set ExitBootServiceEvent to NULL after close it.Jiaxin Wu2018-01-101-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | v2: * Refine the commit log. There are two place to close the ISCSI ExitBootServiceEvent: #1.IScsiOnExitBootService(), which is the callback function of ExitBootServiceEvent. #2.IScsiCleanDriverData(), which will be invoked by ISCSI driver binding stop(). So, the ExitBootServiceEvent will be closed and freed when exit boot server is triggered. But it may be closed and freed again in ISCSI driver binding stop(), which will result in the issue recorded at https://bugzilla.tianocore.org/show_bug.cgi?id=742. This patch is to resolve the issue. Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
* NetworkPkg/IScsiDxe: Correct the DnsMode value according the target info.Jiaxin Wu2017-12-271-0/+1
| | | | | | | | | | | | | | | | | | When the platform gets the target info from DHCP (option 17) and the ISCSI server is expressed as IP address, the value of DnsMode should be false, otherwise, the failure will happen in certain case. please refer to https://bugzilla.tianocore.org/show_bug.chi?id=823 for the detailed steps. Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Karunakar P <karunakarp@amiindia.co.in> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com> Tested-by: Karunakar P <karunakarp@amiindia.co.in> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
* NetworkPkg: Update Api from NetLibDetectMedia to NetLibDetectMediaWaitTimeout.fanwang22017-12-184-12/+17
| | | | | | | | | | | | | | | | Since new Api NetLibDetectMediaWaitTimeout was involved to support connecting state handling, and it is forward compatible. So apply this Api in NetworkPkg. V2: *Define time period in a macro instead of hard code. Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Wu Jiaxin <jiaxin.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wang Fan <fan.wang@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Signed-off-by: fanwang2 <fan.wang@intel.com>
* NetworkPkg: Update IScsiDxe to pass XCODE buildLiming Gao2017-12-052-3/+3
| | | | | | | | | Fix the warning equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality]. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liang Vincent <vincent.liang@intel.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
* NetworkPkg: Fix MSFT C4255 warningSong, BinX2017-11-141-0/+1
| | | | | | | | | | | | | | | | | | V2: Fix MSFT C4255 warning V1: Enable MSFT C4255 warning. From MSDN: Compiler Warning (level 4) C4255 function' : no function prototype given: converting '()' to '(void)' The compiler did not find an explicit list of arguments to a function. This warning is for the C compiler only. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bell Song <binx.song@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* NetworkPkg/IScsiDxe: Add check to avoid use NULL pointerJiaxin Wu2017-10-301-0/+4
| | | | | | | | | Cc: Wu Hao A <hao.a.wu@intel.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
* NetworkPkg/IScsiDxe: Clear the old IFR TargetIp to avoid sharing it with ↵Jiaxin Wu2017-10-271-0/+1
| | | | | | | | | | | | other attempts. Cc: Karunakar P <karunakarp@amiindia.co.in> Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com> Tested-by: Karunakar P <karunakarp@amiindia.co.in> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
* NetworkPkg/IScsiDxe: Add IPv6 support condition check.Jiaxin Wu2017-10-267-4/+159
| | | | | | | | | | | | | | Base on the request of https://bugzilla.tianocore.org/show_bug.cgi?id=710, we provide this patch to IPv6 condition check by leveraging AIP Protocol. Cc: Karunakar P <karunakarp@amiindia.co.in> Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Karunakar P <karunakarp@amiindia.co.in> Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Karunakar p <karunakarp@amiindia.co.in> Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
* NetworkPkg/IScsiDxe: Display InitiatorInfo in attempt page even DHCP enabled.Jiaxin Wu2017-10-261-2/+4
| | | | | | | | | Cc: Karunakar P <karunakarp@amiindia.co.in> Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Karunakar p <karunakarp@amiindia.co.in>
* NetworkPkg/IScsiDxe: Clean the previous ConfigData when switching the IP mode.Jiaxin Wu2017-10-261-1/+8
| | | | | | | | | Cc: Karunakar P <karunakarp@amiindia.co.in> Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Karunakar p <karunakarp@amiindia.co.in>
* NetworkPkg/IScsiDxe: Fix the incorrect/needless DHCP process.Jiaxin Wu2017-10-261-2/+5
| | | | | | | | | | | | | The existing attempt should not trigger the DHCP process if it doesn't associates with the current NIC. That's incorrect when displaying the initiator info in attempt page. Cc: Karunakar P <karunakarp@amiindia.co.in> Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Karunakar p <karunakarp@amiindia.co.in>
* NetworkPkg: Update Protocol/Guid usage in INF file to match source code logicLiming Gao2017-10-101-1/+1
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Cc: Siyuan Fu <siyuan.fu@intel.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
* NetworkPkg/IScsiDxe: Remove redundant call to StrLenHao Wu2017-09-201-2/+4
| | | | | | | | | | The commits utilizes a local variable to store the length of a string which will be used right after. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
* NetworkPkg: Remove the redundant '/' in the end of returned ISCSIMacAddr ↵Fu Siyuan2017-09-181-6/+10
| | | | | | | | keyword. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
* NetworkPkg/IScsiDxe: Fix the incorrect max length of IP_ADDRESS.Jiaxin Wu2017-09-121-4/+4
| | | | | | | | | | | When creating the ISCSI string OpCode for IP_ADDRESS, the max length should be IP(4)_STR_MAX_SIZE instead of IP(4)_MAX_SIZE. Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
* NetworkPkg: iSCSI should allow to set 6 or 12 length of ISID keyword.Fu Siyuan2017-08-043-3/+8
| | | | | | | | | | The last 3 bytes of ISID should be able to changed by setting the keyword with a value with length 6 (only last 3 bytes) or 12 (full ISID) according to the keyword definition in UEFI configuration namespace website. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com>
* NetworkPkg/IScsiDxe: Switch IP4 configuration policy to Static before DHCPJiaxin Wu2017-05-111-0/+61
| | | | | | | | | | | | | | | DHCP4 service allows only one of its children to be configured in the active state. If the DHCP4 D.O.R.A started by IP4 auto configuration and has not been completed, the Dhcp4 state machine will not be in the right state for the iSCSI to start a new round D.O.R.A. So, we need to switch it's policy to static. Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
* NetworkPkg: Fix bug in iSCSI mode ipv6 when enabling target DHCP.Zhang, Lubo2017-05-021-13/+25
| | | | | | | | | | | | | if the server name expressed as a site local address begain with FEC0 when retrieving from dhcpv6 option 59 boot file url, it incorrectly process it as a dns name. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo <lubo.zhang@intel.com> Cc: Wu Jiaxin <jiaxin.wu@intel.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
* NetworkPkg: Add check logic for iSCSI driver.Zhang, Lubo2017-04-202-16/+16
| | | | | | | | | | | | | | Need to check variable of mPrivate whether is null before used and redefine the array length of target address for keyword. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo <lubo.zhang@intel.com> Cc: Wu Jiaxin <jiaxin.wu@intel.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com>
* NetworkPkg: Fix some bugs related to iSCSI keyword configuration.Zhang, Lubo2017-04-011-24/+54
| | | | | | | | | | | | Add check logic and error message for some keywords validity. show target address in URL format and MAC address correctly. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo <lubo.zhang@intel.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com>
* NetworkPkg/IScsiDxe: Fix the incorrect error handling in DriverEntryPointJiaxin Wu2017-03-231-4/+7
| | | | | | | | | | | | | Currently, error handling in IScsiDriverEntryPoint is incorrect. For example, if IScsiCreateAttempts() return error due to the limited max variable size, iSCSI will not unload the configuration entries. Cc: Zhang Lubo <lubo.zhang@intel.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Zhang Lubo <lubo.zhang@intel.com>
* NetworkPkg: Fix potential bug if the iSCSI use dns protocol.Zhang, Lubo2017-03-151-4/+7
| | | | | | | | | | | | | Since we use the Attempt and index as the attempt variable name instead of the MAC address plus index, we need to update this to check the whether the Controller handle is configured to use DNS protocol Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo <lubo.zhang@intel.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
* NetworkPkg: Add check logic for some variable in iSCSI driver.Zhang Lubo2017-03-012-130/+145
| | | | | | | | | | | | | | v2: need to check the global variable mPrivate before using it in the Convert AttemptConfigData To IfrNvData by Keyword function. Add check logic for some attempt variable to enhance code in iSCSI. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo <lubo.zhang@intel.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
* NetworkPkg:Add scriptable configuration to iSCSI driver by leveraging x-UEFI.Zhang Lubo2017-02-2310-270/+2433
| | | | | | | | | | | | | | | | | | | | | | | | | | v2: Add error handling if can not create Attempts in driver entry point. Since we support to define a macro be a PCD value, we enhance our code by modifying the structure in IFR_NVDATA. This effect code logic mainly in Creating Keywords,Convert IFR NvData To AttemptConfigData ByKeyword and reverse function. Fix typo errors and sync based on the latest code. Enable iSCSI keywords configuration based on x-UEFI name space. we introduce new PCD to control the attempt numbers which will be created in non activated state, besides the Attempt name is changed to READ_ONLY attribute in UI. We can invoke KEYWORD HANDLER Protocol to configure the related keywords. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo <lubo.zhang@intel.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Wu Jiaxin jiaxin.wu@intel.com
* NetworkPkg/iSCSIDxe: Update the condition for IScsiStart Aborthegdenag2017-02-152-9/+18
| | | | | | | | | | | | | | Update existing #define and add a new #define used for the PCD PcdIScsiAIPNetworkBootPolicy. Update the code in iScsiStart according to the #define changes in iScsiDriver.h Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com> Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Sriram Subramanian <sriram-s@hpe.com> Reviewed-by: Zhang Lubo <lubo.zhang@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
* NetworkPkg: Add dns support for target URL configuration in ISCSI.Zhang Lubo2017-01-1914-73/+794
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | v2: *1. Add IScsiDnsIsConfigured function in IScsiSupported to check attempt using DNS protocol or not.2. Fix wrongs typos in IScsiDns.c and .uni file.3. define a macro for the length of target URL.4. update the Copyright to 2017. Add DNS support for target URL directly configuration in UI. Besides, When we enable the option (Get target info via DHCP) , the dhcp server will return target info include the rootpath, like the format "iscsi:"<servername>":"<protocol>":"<port>":"<LUN>":"<targetname> According to the RFC 4173,the server name region is expressed as IPv4(192.168.10.20 )or IPv6 ([2000:bbbb::3]) or domain name, but currently we only support the IP address format. To enable this feature, we can support both. Another enhancement is that we can deal with the data received from the iSCSI login response with an target redirection status, in which contains the Target Address in the format domainname[:port][,portal-group-tag] required by RFC 3720. Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Wu Jiaxin <jiaxin.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo <lubo.zhang@intel.com> Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
* NetworkPkg: Update IP4 stack drivers for classless address unicast check.Fu Siyuan2016-10-281-4/+12
| | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
* NetworkPkg/IScsiDxe: rebase to ARRAY_SIZE()Laszlo Ersek2016-10-273-6/+6
| | | | | | | | | Cc: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Siyuan Fu <siyuan.fu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* NetworkPkg: Support bracketed IPv6 address during a redirection in iSCSIZhang Lubo2016-10-262-15/+44
| | | | | | | | | | | | | | | According to RFC 3720, the TargetAddress provided in a redirection might be a DNS host name, a dotted-decimal IPv4 address, or a bracketed IPv6 address. Current ISCSI driver in Networkpkg only supports dotted-decimal IPv4 address, so we need add IPv6 address support since it is a combo driver supporting dual stack. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo <lubo.zhang@intel.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
* NetworkPkg: Fix typos in commentsGary Lin2016-10-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - assocated -> associated - malformated -> malformatted - mal-formated -> mal-formatted - formated -> formatted - octects -> octets - responsiblity -> responsibility - enought -> enough - immediatly -> immediately - integar -> integer - Alogrithem -> Algorithm - Initializeion -> Initialization - primelenght -> primelength - Vlaue -> Value - perfoms -> performs - randome -> random - verifed -> verified - finallization -> finalization - Intializes -> Initializes - specifed -> specified - if -> If - Decrption -> Decryption - Autahentication -> Authentication - informatino -> information - alogrithm -> algorithm - Authenticaion -> Authentication - Alogrithem -> Algorithm - containning -> containing - paramter -> parameter Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gary Lin <glin@suse.com> Reviewed-By: Siyuan Fu <siyuan.fu@intel.com> Reviewed-By: Jiaxin Wu <jiaxin.wu@intel.com>
* NetworkPkg: Record user configured TargetIP/Port in iBFTYe Ting2016-10-144-17/+55
| | | | | | | | | | | | | | | | | | | | Current ISCSI driver records redirected iSCSI targetIP/Port in iBFT once redirection occurs, which removes the possibility of the OS to reconnect to the configured IP for load balancing. The behavior is not explicitly described in IBFT spec, though the MSFT expert confirm we should record original user setting rather than publish the redirected IP. Thanks Sriram for reviewing and validating this patch in his test-bed. Cc: Subramanian Sriram <sriram-s@hpe.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Zhang Lubo <lubo.zhang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Subramanian Sriram <sriram-s@hpe.com>
* NetworkPkg: Fix assert issue in iSCSI driverZhang Lubo2016-08-181-0/+2
| | | | | | | | | | | | | | | | | | The bug is caused by using already freed memory. If there is already an attempt and execute 'reconnect -r' command, all the AttemptConfig structure will be freed, but the mCallbackInfo->Current is not configured as null and this pointer will be used again in IScsiFormExtractConfig. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo <lubo.zhang@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
* NetworkPkg: Refine codes of iSCSI driverZhang Lubo2016-08-181-15/+20
| | | | | | | | | | | | | | The RSDT is only used when the bios need to support ACPI 1.0 version. When change PcdAcpiExposedTableVersions to 0x3C, it will not support ACPI 1.0. The default is 0x3E. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo <lubo.zhang@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
* NetworkPkg IScsiDxe: Fix build error for lastest VS2015 compilerHao Wu2016-07-261-1/+5
| | | | | | | | | | | | | | | | | | | The IScsiDxe module encounters a build error for IA32 arch using the latest version of VS2015: IScsiDxe.lib(IScsiProto.obj) : error LNK2001: unresolved external symbol __allmul The cause is line 141 in file NetworkPkg\IScsiDxe\IScsiProto.c. The third parameter for gBS->SetTimer() function is of type UINT64, so the multiplication should use the MultU64x32() function now. Cc: Siyuan Fu <siyuan.fu@intel.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* NetworkPkg: Fix Assert issue in iSCSI driver.Zhang, Lubo2016-07-111-1/+1
| | | | | | | | | | | | | | | | The bug existed in replacing AsciiStrToUnicodeStr with AsciiStrToUnicodeStrS, since MacString now is a pointer, the value sizeof(MacString)/sizeof (MacString[0]) is not correct here as the third parameter. Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Wu Jiaxin <jiaxin.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo <lubo.zhang@intel.com> Reviewed-By: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* NetworkPkg: Refine codes related to Dhcpv4 and Dhcpv6 configuration.Zhang Lubo2016-06-235-28/+14
| | | | | | | | | | | | | | | | | v2: *Since we have redefined the name of arch types in Dhcp.h for http boot, it need to change corresponding codes. Add a new head file Dhcp.h in Mde/Include/IndustryStandard, normalize the universal option numbers and other network number tags. Cc: Sriram Subramanian <sriram-s@hpe.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Wu Jiaxin <jiaxin.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo <lubo.zhang@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>