summaryrefslogtreecommitdiffstats
path: root/NetworkPkg
Commit message (Collapse)AuthorAgeFilesLines
...
* NetworkPkg/DnsDxe: Fix a typoPhilippe Mathieu-Daudé2020-02-101-4/+4
| | | | | | | | | | | Fix the same typo in various comments. Cc: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Siyuan Fu <siyuan.fu@intel.com> Cc: Maciej Rabeda <maciej.rabeda@intel.com> Reviewed-by: Maciej Rabeda <maciej.rabeda@intel.com> Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com> Message-Id: <20200207010831.9046-34-philmd@redhat.com>
* NetworkPkg/Dhcp6Dxe: Fix various typosAntoine Coeur2020-02-106-41/+41
| | | | | | | | | | | | | 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@intel.com> Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com> Message-Id: <20200207010831.9046-33-philmd@redhat.com>
* NetworkPkg/Dhcp4Dxe: Fix various typosAntoine Coeur2020-02-107-38/+38
| | | | | | | | | | | | | 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@intel.com> Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com> Message-Id: <20200207010831.9046-32-philmd@redhat.com>
* NetworkPkg/ArpDxe: Fix various typosAntoine Coeur2020-02-105-32/+32
| | | | | | | | | | | | | | Fix various typos in documentation, comments and debug strings. 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-31-philmd@redhat.com> [lersek@redhat.com: replace EFI_D_xxx w/ DEBUG_xxx to shut up PatchCheck]
* NetworkPkg: Fix a typoPhilippe Mathieu-Daudé2020-02-1017-33/+33
| | | | | | | | | | | | | Correctly write 'malformatted' in documentation, comments and debug strings. Cc: Andrew Fish <afish@apple.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Leif Lindholm <leif.lindholm@linaro.org> Cc: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Maciej Rabeda <maciej.rabeda@intel.com> Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com> Message-Id: <20200207010831.9046-30-philmd@redhat.com>
* NetworkPkg/HttpDxe: fix 32-bit truncation in HTTPS downloadLaszlo Ersek2020-01-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When downloading over TLS, each TLS message ("APP packet") is returned as a (decrypted) fragment table by EFI_TLS_PROTOCOL.ProcessPacket(). The TlsProcessMessage() function in "NetworkPkg/HttpDxe/HttpsSupport.c" linearizes the fragment table into a single contiguous data block. The resultant flat data block contains both TLS headers and data. The HttpsReceive() function parses the actual application data -- in this case: decrypted HTTP data -- out of the flattened TLS data block, peeling off the TLS headers. The HttpResponseWorker() function in "NetworkPkg/HttpDxe/HttpImpl.c" propagates this HTTP data outwards, implementing the EFI_HTTP_PROTOCOL.Response() function. Now consider the following documentation for EFI_HTTP_PROTOCOL.Response(), quoted from "MdePkg/Include/Protocol/Http.h": > It is the responsibility of the caller to allocate a buffer for Body and > specify the size in BodyLength. If the remote host provides a response > that contains a content body, up to BodyLength bytes will be copied from > the receive buffer into Body and BodyLength will be updated with the > amount of bytes received and copied to Body. This allows the client to > download a large file in chunks instead of into one contiguous block of > memory. Note that, if the caller-allocated buffer is larger than the server-provided chunk, then the transfer length is limited by the latter. This is in fact the dominant case when downloading a huge file (for which UefiBootManagerLib allocated a huge contiguous RAM Disk buffer) in small TLS messages. For adjusting BodyLength as described above -- i.e., to the application data chunk that has been extracted from the TLS message --, the HttpResponseWorker() function employs the following assignment: HttpMsg->BodyLength = MIN (Fragment.Len, (UINT32) HttpMsg->BodyLength); The (UINT32) cast is motivated by the MIN() requirement -- in "MdePkg/Include/Base.h" -- that both arguments be of the same type. "Fragment.Len" (NET_FRAGMENT.Len) has type UINT32, and "HttpMsg->BodyLength" (EFI_HTTP_MESSAGE.BodyLength) has type UINTN. Therefore a cast is indeed necessary. Unfortunately, the cast is done in the wrong direction. Consider the following circumstances: - "Fragment.Len" happens to be consistently 16KiB, dictated by the HTTPS Server's TLS stack, - the size of the file to download is 4GiB + N*16KiB, where N is a positive integer. As the download progresses, each received 16KiB application data chunk brings the *next* input value of BodyLength closer down to 4GiB. The cast in MIN() always masks off the high-order bits from the input value of BodyLength, but this is no problem because the low-order bits are nonzero, therefore the MIN() always permits progress. However, once BodyLength reaches 4GiB exactly on input, the MIN() invocation produces a zero value. HttpResponseWorker() adjusts the output value of BodyLength to zero, and then passes it to HttpParseMessageBody(). HttpParseMessageBody() (in "NetworkPkg/Library/DxeHttpLib/DxeHttpLib.c") rejects the zero BodyLength with EFI_INVALID_PARAMETER, which is fully propagated outwards, and aborts the HTTPS download. HttpBootDxe writes the message "Error: Unexpected network error" to the UEFI console. For example, a file with size (4GiB + 197MiB) terminates after downloading just 197MiB. Invert the direction of the cast: widen "Fragment.Len" to UINTN. Cc: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com> Cc: Siyuan Fu <siyuan.fu@intel.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com> Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com>
* NetworkPkg/NetworkPkg.uni: Add missing strings for PCDShenglei Zhang2019-12-041-0/+7
| | | | | | | | Cc: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Siyuan Fu <siyuan.fu@intel.com> Cc: Maciej Rabeda <maciej.rabeda@intel.com> Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
* NetworkPkg: Fixes to static code analysis hitsMaciej Rabeda2019-12-043-1/+7
| | | | | | | | | | | | Introducing fixes to memory leak issues identified by static code analysis tool. Cc: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Siyuan Fu <siyuan.fu@intel.com> Signed-off-by: Maciej Rabeda <maciej.rabeda@linux.intel.com> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
* NetworkPkg: Add YAML file for CI buildsMichael D Kinney2019-11-112-0/+67
| | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=2315 Add YAML file to the package directory with the configuration of the checks to perform during a CI build. Use BaseCryptLibNull and TlsLibNull for package CI builds to reduce package build times. Enabled with CONTINUOUS_INTEGRATION in YAML files. By default CONTINUOUS_INTEGRATION is not defined, and the original lib mappings are preserved. Cc: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Siyuan Fu <siyuan.fu@intel.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* NetworkPkg/HttpDxe: Set the HostName for the verification (CVE-2019-14553)Wu, Jiaxin2019-11-022-4/+18
| | | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=960 CVE: CVE-2019-14553 Set the HostName by consuming TLS protocol to enable the host name check so as to avoid the potential Man-In-The-Middle attack. Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Long Qin <qin.long@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <20190927034441.3096-5-Jiaxin.wu@intel.com> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Sivaraman Nainar <sivaramann@amiindia.co.in> Cc: Xiaoyu Lu <xiaoyux.lu@intel.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com>
* NetworkPkg/TlsDxe: Add the support of host validation to TlsDxe driver ↵Wu, Jiaxin2019-11-021-3/+41
| | | | | | | | | | | | | | | | | | | | | | (CVE-2019-14553) REF: https://bugzilla.tianocore.org/show_bug.cgi?id=960 CVE: CVE-2019-14553 The new data type named "EfiTlsVerifyHost" and the EFI_TLS_VERIFY_HOST_FLAG are supported in TLS protocol. Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Long Qin <qin.long@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <20190927034441.3096-4-Jiaxin.wu@intel.com> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Sivaraman Nainar <sivaramann@amiindia.co.in> Cc: Xiaoyu Lu <xiaoyux.lu@intel.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com>
* NetworkPkg/SnpDxe: Use PcdGetBool() instead of FixedPcdGetBool in Snp.cSiyuan, Fu2019-10-291-2/+2
| | | | | | | | | | | | This patch fixes a problem introduced by commit 61bb6eeb4d93c0a34c1995d87914ab41398f9550. The PcdSnpCreateExitBootServicesEvent is not guaranteed to be FixedAtBuild, so use PcdGetBool() to supports both fixed and patchable PCD. Cc: Jiaxin Wu <jiaxin.wu@intel.com> Signed-off-by: Siyuan Fu <siyuan.fu@intel.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
* NetworkPkg: Add missing components to DSC fileSean Brogan2019-10-241-0/+6
| | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=2259 Update DSC file to build all libraries and modules in the NetworkPkg. Cc: Siyuan Fu <siyuan.fu@intel.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
* NetworkPkg/SnpDxe: Add PCD to remove ExitBootServices event from SNP driver.Rabeda, Maciej2019-10-214-20/+35
| | | | | | | | | | | | | | | | | | | | | | | | | Patch addresses Bugzilla #1974. During ExitBootServices stage, drivers should not call any functions known to use Memory Allocation Services. One of such functions (as per UEFI spec) is UNDI->Shutdown(). Since UNDI drivers during ExitBootServices phase are expected to put the adapter to such a state that it will not perform any DMA operations, there is no need to interface UNDI by SNP driver during that phase. Finally, since ExitBootServices event notification function in SNP only calls UNDI->Shutdown() and Stop() functions, there is no need to create this event at all. Adding PCD to control creation of event reacting to ExitBootServices() call so that systems with UNDIs relying on SNP to call their Shutdown() and Stop() can still work. Change-Id: Idd76f26d2e8ff7cf88b2d75e2d524c74211f2e89 Reviewed-by: Siyuan Fu <siyuan.fu@intel.com> Signed-off-by: Maciej Rabeda <maciej.rabeda@intel.com> Cc: Siyuan Fu <siyuan.fu@intel.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com>
* NetworkPkg/Ip6Dxe: Fix typo in commentPhilippe Mathieu-Daude2019-10-171-1/+1
| | | | | | | | | An extra 's' slipped into the 'processing' word. Drop it to fix the typo. Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com> Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com>
* NetworkPkg/TcpDxe: fix SockFreeFoo() parameter listLaszlo Ersek2019-10-091-2/+2
| | | | | | | | | | | | | | | The SockFreeFoo() callback function for NetbufFromExt() has to match the NET_VECTOR_EXT_FREE prototype, which takes a (VOID*) as callback argument (Arg). EFI_EVENT has nothing to do with NET_VECTOR_EXT_FREE. Fix the SockFreeFoo() parameter list. This change is a no-op in practice. Cc: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Siyuan Fu <siyuan.fu@intel.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
* NetworkPkg/Ip4Dxe: fix NetLibDestroyServiceChild() callLaszlo Ersek2019-10-091-2/+2
| | | | | | | | | | | | | Both NetLibDestroyServiceChild() and EFI_SERVICE_BINDING_DESTROY_CHILD take an EFI_HANDLE for the "ChildHandle" parameter, not an (EFI_HANDLE*). This patch fixes a real bug. Cc: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Siyuan Fu <siyuan.fu@intel.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
* NetworkPkg: fix CloseProtocol & UninstallMultipleProtocolInterfaces callsLaszlo Ersek2019-10-096-7/+7
| | | | | | | | | | | | | | | | 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/DxeNetLib: fix type typo in NetLibGetMacAddress()Laszlo Ersek2019-10-091-1/+1
| | | | | | | | | | | | | | | NetLibGetSnpHandle() returns an EFI_HANDLE, not an (EFI_HANDLE*). NetLibGetMacAddress() only uses the return value ("SnpHandle") for a NULL-check. Fix the type of "SnpHandle". This patch is a no-op. Cc: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Siyuan Fu <siyuan.fu@intel.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
* NetworkPkg: Remove unnecessary MdeModulePkg/MdeModulePkg.dec dependency in INFLiming Gao2019-10-0819-19/+0
| | | | | | | Cc: Siyuan Fu <siyuan.fu@intel.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
* NetworkPkg UefiPxeBcDxe: Consume PcdTftpBlockSize defined in NetworkPkg.decLiming Gao2019-10-081-1/+1
| | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2195 Cc: Siyuan Fu <siyuan.fu@intel.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
* NetworkPkg: Add PcdTftpBlockSize in NetworkPkg.decLiming Gao2019-10-082-0/+13
| | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2195 PcdTftpBlockSize is network related PCD. It should be defined in NetworkPkg.dec. Cc: Siyuan Fu <siyuan.fu@intel.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
* NetworkPkg: Move network related header files from MdeModulePkg to NetworkPkgLiming Gao2019-10-084-0/+73
| | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2196 Cc: Siyuan Fu <siyuan.fu@intel.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
* NetworkPkg: add missing newline at end of fileLeif Lindholm2019-10-041-1/+1
| | | | | | | | | | Add missing newline at end of WifiConnectionManagerDxe .uni. Cc: Siyuan Fu <siyuan.fu@intel.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
* NetworkPkg: Move Dpc.h from MdeModulePkg to NetworkPkgShenglei Zhang2019-08-153-2/+98
| | | | | | | | | | | Move Dpc.h from MdeModulePkg to NetworkPkg. And remove the dependency on MdeModulePkg.dec in INFs. https://bugzilla.tianocore.org/show_bug.cgi?id=1949 Cc: Siyuan Fu <siyuan.fu@intel.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
* NetworkPkg: Add Dpc protocolShenglei Zhang2019-08-151-0/+4
| | | | | | | | | | | To move Dpc.h from MdeModulePkg to NetworkPkg, we need to introduce the Guid of protocol first. https://bugzilla.tianocore.org/show_bug.cgi?id=1949 Cc: Siyuan Fu <siyuan.fu@intel.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
* NetworkPkg: Move Network library header file from MdeModulePkg to NetworkPkgLiming Gao2019-05-2729-0/+4063
| | | | | | | | 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: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
* NetworkPkg: Move Network library and drivers from MdeModulePkg to NetworkPkgLiming Gao2019-05-27147-24/+64905
| | | | | | | | 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: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
* NetworkPkg: Add package level include DSC fileLiming Gao2019-05-082-21/+41
| | | | | | | | Platform DSC can include Network.dsc.inc to enable network features. Signed-off-by: Liming Gao <liming.gao@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
* NetworkPkg: Add DSC/FDF include segment files to NetworkPkg.Liming Gao2019-05-085-0/+275
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch provides a set of include segment files for platform owner to easily enable/disable network stack support on their platform. For DSC, there are: - a "NetworkDefines.dsc.inc" for the [Defines] section(s), - a "NetworkLibs.dsc.inc" for the [LibraryClasses*] section(s), - a "NetworkPcds.dsc.inc" for the [Pcds*] section(s), - a "NetworkComponents.dsc.inc" for the [Components*] section(s). For FDF, there is: - a "Network.fdf.inc" for the [Fv*] section(s). These files can be added to the platform DSC/FDF file by using !include NetworkPkg/xxx where "xxx" is the *.inc file name. A platform DSC file can diverge from the defaults in "NetworkDefines.dsc.inc" by setting the individual DEFINEs before including "NetworkDefines.dsc.inc". And, build command line ("-D FLAG=VALUE") can be used to enable or disable related feature set, please check "NetworkDefines.dsc.inc" for a detail description of each flag. The default value of these flags are: DEFINE NETWORK_ENABLE = TRUE DEFINE NETWORK_SNP_ENABLE = TRUE DEFINE NETWORK_IP4_ENABLE = TRUE DEFINE NETWORK_IP6_ENABLE = TRUE DEFINE NETWORK_TLS_ENABLE = TRUE DEFINE NETWORK_HTTP_BOOT_ENABLE = TRUE DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = FALSE DEFINE NETWORK_ISCSI_ENABLE = TRUE DEFINE NETWORK_VLAN_ENABLE = TRUE Related BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1293 Cc: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Ting Ye <ting.ye@intel.com> Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
* NetworkPkg DSC: Add the required ARM library to pass ARM buildLiming Gao2019-05-081-1/+3
| | | | | Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* NetworkPkg: Add missing string token in NetworkPkg.uniXue, ShengfengX2019-04-291-1/+13
| | | | | | | | | | | | REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1741 UNI file that is associated by INF or DEC file need define the prompt and help information in NetworkPkg.uni Signed-off-by: Xue ShengfengX <shengfengx.xue@intel.com> Cc: Siyuan Fu <siyuan.fu@intel.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
* NetworkPkg: Remove IpSec driver and applicationWang, Fan2019-04-2953-29709/+0
| | | | | | | | | | | | | * REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1697 The IpSec driver in NetworkPkg is not really used by platforms but has security risks. So it is scheduled to be removed from edk2, also include IpSecConfig application. Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Wu Jiaxin <jiaxin.wu@intel.com> Signed-off-by: Wang Fan <fan.wang@intel.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
* NetworkPkg/UefiPxeBcDxe:Add two PCD to control PXE.Xue, ShengfengX2019-04-224-4/+29
| | | | | | | | | | | | | | | REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1695 Setup need provide an item for user to control IPV46 PXE boot. Origin UefiPxeBcDxe driver doesn't have such interface. This change added two PCD to control IPV4/6 PXE in PxeBcSupported(). Platform code should override this two PCD according to Setup value. code change no side effect on current PXE function with default PCD. Signed-off-by: Xue ShengfengX <shengfengx.xue@intel.com> Cc: Siyuan Fu <siyuan.fu@intel.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
* NetworkPkg: Replace BSD License with BSD+Patent LicenseMichael D Kinney2019-04-09296-2066/+296
| | | | | | | | | | | | | | | | | | | | 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: Fix Duplicate FreePool Error in WCMWang, Fan2019-03-014-1/+11
| | | | | | | | | | | | | | | | | | | | * REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1577 In WiFi Connection Manager scan process, the result received from WiFi device driver will be freed twice, and will cause unexpected errors, and even system crash. This issue also exists in some other places potentially, this patch is to fix these issues and also add Timer Cancelling before Close to avoid potential NULL reference. 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.1 Signed-off-by: Wang Fan <fan.wang@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
* NetworkPkg: Add WiFi Connection Manager to NetworkPkgWang Fan2019-02-2823-0/+7320
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * V2 * Remove Arch dependency in Inf file * Add a global guid for WiFi formset and set other guids to module levels * Open supplicant and EapConfig by BY_DRIVER * Remove token free function to avoid potential NULL reference * Update WifiMgrUpdateConnectMessage() to only display message for Current Nic * Fix the potential NULL reference in AIP call * REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1492 Add WiFi Connection Manager in NetworkPkg to provide UI for users to scan networks, connect or disconnect to networks. This connection manager won't include the UNDI driver, supplicant driver, or other device specific drivers and is therefor not a complete solution stack for UEFI Wi-Fi, users can seek help for Wireless card vendors. 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.1 Signed-off-by: Wang Fan <fan.wang@intel.com> Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
* NetworkPkg/DnsDxe: [CVE-2018-12178] Check the received packet size before ↵Jiaxin Wu2019-02-282-10/+69
| | | | | | | | | | | | | | | | | | | | | | parsing the message. Fix CVE-2018-12178 REF: https://bugzilla.tianocore.org/show_bug.cgi?id=809 The DNS driver only checks the received packet size against the minimum DNS header size in DnsOnPacketReceived(), later it accesses the QueryName and QuerySection beyond the header scope, which might cause the pointer within DNS driver points to an invalid entry or modifies the memory content beyond the header scope. This patch is to fix above problem. Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Wang Fan <fan.wang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
* NetworkPkg/Ip6Dxe: Clean the invalid IPv6 configuration during driver start.Jiaxin Wu2019-02-191-4/+22
| | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1448 *v3: Change the if condition check to only clean the invalid configuration. *v2: Add the warning debug message. This patch is to clean the invalid data and continue to start IP6 driver. Cc: Michael Turner <Michael.Turner@microsoft.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
* NetworkPkg/Ip6Dxe: Uninstall protocols when error happen in Driver Binding ↵Jiaxin Wu2019-02-121-9/+19
| | | | | | | | | | | | | | | | | Start. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1447 This patch is to uninstall Ip6ServiceBindingProtocol and Ip6ConfigProtocol when error happen in Driver Binding Start. Cc: Michael Turner <Michael.Turner@microsoft.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com> Signed-off-by: Michael Turner <Michael.Turner@microsoft.com> Reviewed-By: Ye Ting <ting.ye@intel.com>
* NetworkPkg/DnsDxe: Remove unnecessary NULL pointer check.Jiaxin Wu2019-01-231-13/+9
| | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1469 Since the value of ItemCache4/ItemCache6 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 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/Dhcp6Dxe: Remove an unused global variable.Songpeng Li2019-01-152-3/+0
| | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1413 The global variable mAllDhcpServersAddress has never been used, this patch is to clean it. 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: 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: Protocol Uninstallation CleanupAshish Singhal2019-01-146-70/+35
| | | | | | | | | | | Use UEFILib provided protocol uninstallation abstraction instead of direct API for a proper cleanup. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1444 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ashish Singhal <ashishsingha@nvidia.com> Reviewed-by: Wu Jiaxin <jiaxin.wu@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 UefiPxeBcDxe.infSiyuan Fu2018-12-241-6/+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: 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: Remove some clarification from TcpDxe.infSiyuan Fu2018-12-241-6/+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>