summaryrefslogtreecommitdiffstats
path: root/NetworkPkg/IScsiDxe/IScsiMisc.c
Commit message (Collapse)AuthorAgeFilesLines
* NetworkPkg/IScsiDxe: fix IScsiHexToBin() buffer overflowLaszlo Ersek2021-06-091-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | The IScsiHexToBin() function documents the EFI_BUFFER_TOO_SMALL return condition, but never actually checks whether the decoded buffer fits into the caller-provided room (i.e., the input value of "BinLength"), and EFI_BUFFER_TOO_SMALL is never returned. The decoding of "HexStr" can overflow "BinBuffer". This is remotely exploitable, as shown in a subsequent patch, which adds error checking to the IScsiHexToBin() call sites. This issue allows the target to compromise the initiator. Introduce EFI_BAD_BUFFER_SIZE, in addition to the existent EFI_BUFFER_TOO_SMALL, for reporting a special case of the buffer overflow, plus actually catch the buffer overflow. Cc: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com> Cc: Philippe Mathieu-Daudé <philmd@redhat.com> Cc: Siyuan Fu <siyuan.fu@intel.com> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3356 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20210608121259.32451-10-lersek@redhat.com>
* NetworkPkg/IScsiDxe: fix IScsiHexToBin() hex parsingLaszlo Ersek2021-06-091-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The IScsiHexToBin() function has the following parser issues: (1) If the *subject sequence* in "HexStr" is empty, the function returns EFI_SUCCESS (with "BinLength" set to 0 on output). Such inputs should be rejected. (2) The function mis-handles a "HexStr" that ends with a stray nibble. For example, if "HexStr" is "0xABC", the function decodes it to the bytes {0xAB, 0x0C}, sets "BinLength" to 2 on output, and returns EFI_SUCCESS. Such inputs should be rejected. (3) If an invalid hex char is found in "HexStr", the function treats it as end-of-hex-string, and returns EFI_SUCCESS. Such inputs should be rejected. All of the above cases are remotely triggerable, as shown in a subsequent patch, which adds error checking to the IScsiHexToBin() call sites. While the initiator is not immediately compromised, incorrectly parsing CHAP_R from the target, in case of mutual authentication, is not great. Extend the interface contract of IScsiHexToBin() with EFI_INVALID_PARAMETER, for reporting issues (1) through (3), and implement the new checks. Cc: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com> Cc: Philippe Mathieu-Daudé <philmd@redhat.com> Cc: Siyuan Fu <siyuan.fu@intel.com> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3356 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20210608121259.32451-9-lersek@redhat.com>
* NetworkPkg/IScsiDxe: reformat IScsiHexToBin() leading comment blockLaszlo Ersek2021-06-091-8/+8
| | | | | | | | | | | | | | | | | | We'll need further return values for IScsiHexToBin() in a subsequent patch; make room for them in the leading comment block of the function. While at it, rewrap the comment block to 80 characters width. No functional changes. Cc: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com> Cc: Philippe Mathieu-Daudé <philmd@redhat.com> Cc: Siyuan Fu <siyuan.fu@intel.com> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3356 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20210608121259.32451-8-lersek@redhat.com>
* NetworkPkg/IScsiDxe: fix potential integer overflow in IScsiBinToHex()Laszlo Ersek2021-06-091-4/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Considering IScsiBinToHex(): > if (((*HexLength) - 3) < BinLength * 2) { > *HexLength = BinLength * 2 + 3; > } the following subexpressions are problematic: (*HexLength) - 3 BinLength * 2 BinLength * 2 + 3 The first one may wrap under zero, the latter two may wrap over MAX_UINT32. Rewrite the calculation using SafeIntLib. While at it, change the type of the "Index" variable from UINTN to UINT32. The largest "Index"-based value that we calculate is Index * 2 + 2 (with (Index == BinLength)) Because the patch makes BinLength * 2 + 3 safe to calculate in UINT32, using UINT32 for Index * 2 + 2 (with (Index == BinLength)) is safe too. Consistently using UINT32 improves readability. This patch is best reviewed with "git show -W". The integer overflows that this patch fixes are theoretical; a subsequent patch in the series will audit the IScsiBinToHex() call sites, and show that none of them can fail. Cc: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com> Cc: Philippe Mathieu-Daudé <philmd@redhat.com> Cc: Siyuan Fu <siyuan.fu@intel.com> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3356 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20210608121259.32451-6-lersek@redhat.com>
* NetworkPkg/IScsiDxe: Fix various typosAntoine Coeur2020-02-101-3/+3
| | | | | | | | | | | | | 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: Replace BSD License with BSD+Patent LicenseMichael D Kinney2019-04-091-7/+1
| | | | | | | | | | | | | | | | | | | | 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: 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: Clean up source filesLiming Gao2018-06-281-72/+72
| | | | | | | | | 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: Add IPv6 support condition check.Jiaxin Wu2017-10-261-2/+133
| | | | | | | | | | | | | | 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: 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/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-041-1/+1
| | | | | | | | | | 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: 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 scriptable configuration to iSCSI driver by leveraging x-UEFI.Zhang Lubo2017-02-231-22/+794
| | | | | | | | | | | | | | | | | | | | | | | | | | 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: Add dns support for target URL configuration in ISCSI.Zhang Lubo2017-01-191-1/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/IScsiDxe: rebase to ARRAY_SIZE()Laszlo Ersek2016-10-271-3/+3
| | | | | | | | | 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: Record user configured TargetIP/Port in iBFTYe Ting2016-10-141-5/+5
| | | | | | | | | | | | | | | | | | | | 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: Replace ASSERT with error handling in Http boot and IScsiZhang Lubo2016-06-231-1/+4
| | | | | | | | | | | | | | | v2: *Fix some memory leak issue. This patch is used to replace ASSERT with error handling in Http boot Driver and IScsi driver. 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>
* NetworkPkg: Replace UnicodeStrToAsciiStr/AsciiStrToUnicodeStrStar Zeng2016-06-211-3/+3
| | | | | | | | | | | | | | | It is the follow up of 3ab41b7a325ca11a12b42f5ad1661c4b6791cb49 to replace UnicodeStrToAsciiStr/AsciiStrToUnicodeStr with UnicodeStrToAsciiStrS/AsciiStrToUnicodeStrS. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Siyuan Fu <siyuan.fu@intel.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
* NetworkPkg: Fix GCC code build error of iSCSI driver.Zhang Lubo2016-04-221-1/+3
| | | | | | | | Fix GCC build error when refine the codes of iSCSI driver. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo <lubo.zhang@intel.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
* NetworkPkg: refine codes of iSCSI driver.Zhang Lubo2016-04-221-8/+17
| | | | | | | | | | | | | | | Add error handling logic in DriverBingingStop function, it may return error status when invoking the UninstallProtocolInterface. 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: Ye Ting <ting.ye@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
* NetworkPkg IScsiDxe: Fix typos in function descriptionsHao Wu2016-01-061-1/+1
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19601 6f19259b-4bc3-4df7-8a09-765794883524
* NetworkPkg:Fix iSCSI driver issue to work with iSCSI LIO targetYe Ting2015-09-251-1/+2
| | | | | | | | | | | | | | | | The patch fixes iSCSI driver can't reinstate itself when configured in AutoConfigure mode and IPv6 stack is actually used. The issue occurs when iSCSI driver communicates with iSCSI LIO target in IPv6 path and the target sends back TCP FIN packets randomly. 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: Wu jiaxin <jiaxin.wu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18546 6f19259b-4bc3-4df7-8a09-765794883524
* NetworkPkg: Change the macro name to fit coding stylefanwang22015-08-111-4/+4
| | | | | | | | | | | Change several macro names to fit name EDK2 naming conventions: Use all capital letters for #define. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: fanwang2 <fan.wang@intel.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Qiu Shumin <shumin.qiu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18199 6f19259b-4bc3-4df7-8a09-765794883524
* NetworkPkg: Add old IPv4_DEVICE_PATH and IPv6_DEVICE_PATH supportfanwang22015-07-261-12/+50
| | | | | | | | | | | | | | | | | | | GatewayIpAddress and SubnetMask do not exist in old IPv4_DEVICE_PATH, IPAddressOrigin, PrefixLength and GatewayIPAddress do not exist in old IPv6_DEVICE_PATH. This will lead new IScsiDxe to error without updating IPv4_DEVICE_PATH and IPv6_DEVICE_PATH in system. Following UEFI2.5 spec of IPv4_DEVICE_PATH do a check before accessing fields only defined in new version's IPv4_DEVICE_PATH, and revise the same issue for IPv6_DEVICE_PATH in Iscsi driver. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: fanwang2 <fan.wang@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> [lersek@redhat.com: rewrapped commit message] Signed-off-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18056 6f19259b-4bc3-4df7-8a09-765794883524
* Code refine. Check the original length of array to avoid buffer over flow.Qiu Shumin2014-12-191-0/+1
| | | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16539 6f19259b-4bc3-4df7-8a09-765794883524
* Use string pointer instead string buffer to avoid string copy operation.Fu, Siyuan2014-08-151-2/+4
| | | | | | | | | | Use CopyMem() to guarantee the NULL terminal will always be appended to the destination string. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu, Siyuan <siyuan.fu@intel.com> Reviewed-by: Yao, Jiewen <jiewen.yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15810 6f19259b-4bc3-4df7-8a09-765794883524
* Update network stack code to use StrnCpy instead of StrCpy.Fu, Siyuan2014-08-081-1/+1
| | | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu, Siyuan <siyuan.fu@intel.com> Reviewed-By: Dong, Eric <eric.dong@intel.com> Reviewed-by: Wu, Jiaxin <jiaxin.wu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15773 6f19259b-4bc3-4df7-8a09-765794883524
* Fix bug in unload function: Check if component name protocol exist, only ↵Fu Siyuan2014-01-101-1/+68
| | | | | | | | | | uninstall it when it really exists. Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Tian, Feng <feng.tian@intel.com> Reviewed-by: Jin, Eric <eric.jin@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15092 6f19259b-4bc3-4df7-8a09-765794883524
* Fix a K9 error.Result of GetVariable2() function that may return NULL will ↵Wu Jiaxin2013-10-291-1/+2
| | | | | | | | | | be dereferenced. Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com > Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Dong Guo <guo.dong@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14814 6f19259b-4bc3-4df7-8a09-765794883524
* Fix a bug about the iSCSI DHCP dependency issue.Wu Jiaxin2013-10-251-1/+94
| | | | | | | | | | Create rules to determine whether iSCSI need DHCP protocol in current configuration by examining user’s configuration data in DriverBindingSupported(). 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> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14803 6f19259b-4bc3-4df7-8a09-765794883524
* Fixed build failed.ydong102012-05-311-1/+1
| | | | | | Signed-off-by: Eric Dong <eric.dong@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13406 6f19259b-4bc3-4df7-8a09-765794883524
* Add new interface GetVariable2 and GetEfiGlobalVariable2 to return more ↵ydong102012-05-301-5/+7
| | | | | | | | | info. Also replace old interface with new one. Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13375 6f19259b-4bc3-4df7-8a09-765794883524
* Adopt new IPv4/IPv6 device path for network modules.niruiyu2011-10-261-2/+16
| | | | | | | | | | | 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
* Clean up the private GUID definition in module Level.lgao42011-09-181-1/+1
| | | | | | | | | | | | | 0. Remove the unused private GUID from module source files. 1. Use gEfiCallerIdGuid replace of the private module GUID. 2. Add the public header files to define HII FormSet and PackageList GUID used in every HII driver. Signed-off-by: lgao4 Reviewed-by: ydong10 gdong1 tye jfan12 wli12 rsun3 jyao1 ftian git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12376 6f19259b-4bc3-4df7-8a09-765794883524
* 1. Update iSCSI UI to be more user-friendly.tye12011-08-311-1/+9
| | | | | | | | | | | | 2. Fix potential memory leak issue in IScsiConfig.c. Signed-off-by: tye Reviewed-by: xdu2 Reviewed-by: lgao4 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12245 6f19259b-4bc3-4df7-8a09-765794883524
* Add IScsiDxe driver to NetworkPkg in order to support iSCSI over IPv6 stack ↵tye12011-08-171-0/+1320
and iSCSI MPIO. Signed-off-by: tye1 Reviewed-by: hhuan13 Reviewed-by: eric_tian git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12149 6f19259b-4bc3-4df7-8a09-765794883524