summaryrefslogtreecommitdiffstats
path: root/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.c
Commit message (Collapse)AuthorAgeFilesLines
* NetworkPkg/UefiPxeBcDxe: Fix various typosAntoine Coeur2020-02-101-9/+9
| | | | | | | | | | | | 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-53-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: UefiPxeBcDxe: Remove the redundant code.Songpeng Li2018-08-231-23/+0
| | | | | | | | | | | | | | The function PxeBcFreeBootFileOption that is never called have 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: Clean up source filesLiming Gao2018-06-281-39/+39
| | | | | | | | | 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: Fix memory leak problem in PXE driver.Fu Siyuan2018-01-041-6/+21
| | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Sriram Subramanian <sriram-s@hpe.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
* NetworkPkg: Check allocated buffer pointer before use.Fu Siyuan2018-01-041-1/+4
| | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Sriram Subramanian <sriram-s@hpe.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
* NetworkPkg: Fix PXEv6 boot failure when DhcpBinl offer received.Jiaxin Wu2017-05-031-20/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In case of the DHCP and PXE services on different servers,PXEv6 boot will failure when DhcpBinl offer received. The issue is caused by the following reasons: * PXE Client doesn't append VENDOR_CLASS request parameter, so the offer replied from DHCP service will not contain VENDOR_CLASS option (16). * Once the DhcpBinl offer is selected, the boot discover message should be sent out to request the bootfile by this offer. Current implementation always use servers multi-cast address instead of BootFileUrl address in dhcp6 offer. we should check it first, then decide whether use multi-cast address or not. * If DhcpBinl offer is selected, the boot discover message shouldn't find server ID Option from DhcpBinl offer. That's incorrect because DHCP service and PXE service on different servers. In such a case, we can ignore the Server ID Option. With the above fix in the patch, PXEv6 can boot successfully when DhcpBinl offer received. 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> Reviewed-by: Ye Ting <ting.ye@intel.com>
* NetworkPkg: Correct the proxy DHCP offer handingJiaxin Wu2017-04-211-2/+3
| | | | | | | | | | | | | | When PXE10/WFM11a offer received, we should only cache the first PXE10/WFM11a offer, and discard the others. But Current we discard all PXE10/WFM11a offer. This patch is to fix this issue. Cc: Ye Ting <ting.ye@intel.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: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com>
* NetworkPkg: Replace ASSERT with error return code in PXE and HTTP boot driver.Fu Siyuan2016-12-191-20/+50
| | | | | | | | | | This patch remove the ASSERT when receive a DHCP packet large than the maximum cache buffer size. 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: Check for the max DHCP packet length before use it.Fu Siyuan2016-11-181-0/+29
| | | | | | | | | This patch updates the PXE and HTTP boot driver to drop the input DHCP packet if it exceed the maximum length. 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: Add error handling logic when using AllocateZeroPoolZhang Lubo2016-10-311-2/+6
| | | | | | | | | | | Add error handling logic if failed to apply new memory. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo <lubo.zhang@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-By: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-By: Fu Siyuan <siyuan.fu@intel.com>
* NetworkPkg: Add dns support for pxe boot based on IPv6.Zhang Lubo2016-10-261-28/+241
| | | | | | | | | | | | | | | The BootFileURL option (59) in dhcpv6 is used to deliver the next server address with bootfile name, as an example "tftp://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]/BOOTFILE_NAME; mode=octet", it can also be “tftp://domain_name/BOOTFILE_NAME; mode=octet”, this patch is to support this case. 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: Refine codes related to Dhcpv4 and Dhcpv6 configuration.Zhang Lubo2016-06-231-14/+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>
* NetworkPkg: Fix suspicious dereference of pointer 'Mode.Ia'Zhang Lubo2016-02-031-1/+1
| | | | | | | | | | | | | This patch is used to fix suspicious dereference of pointer 'Mode.Ia' before NULL check. 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: Siyuan Fu <siyuan.fu@intel.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
* NetworkPkg:Fix Network memory leak when calling GetModeData interfaceZhang Lubo2016-01-281-2/+7
| | | | | | | | | | | | | Multiple network protocols have a GetModeData() interface, which may allocate memory resource in the return mode data structure. It's callers responsibility to free these buffers. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo <lubo.zhang@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@19758 6f19259b-4bc3-4df7-8a09-765794883524
* NetworkPkg: remove unnecessary timeout event when setting IPv6 address.Fu Siyuan2015-10-151-47/+50
| | | | | | | | | | | | | Use Ip6Cfg->SetData() to set IP6 manual address is asynchronous process and the registered data notify event will be singled when process is done. So it's not necessary to create another timeout event for the address setting. 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: Jiaxin Wu <jiaxin.wu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18610 6f19259b-4bc3-4df7-8a09-765794883524
* PXE driver bug fix.Fu Siyuan2015-03-261-8/+6
| | | | | | | | | | | | 1. Update the parameter check of PXE.UdpRead() to align with spec definition. 2. Update PXE driver to use EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_DEST_IP when calling UdpRead to receive server discovery message. 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> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17075 6f19259b-4bc3-4df7-8a09-765794883524
* Fix a bug that the gateway is not necessary in a simple PXE network.Gary Lin2014-12-181-3/+5
| | | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gary Lin <glin@suse.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@16535 6f19259b-4bc3-4df7-8a09-765794883524
* NetworkPkg: Source fixes and cleanup for ARMGCC compilesRandy Pawell2014-12-041-2/+1
| | | | | | | | | | | | | | | | | - Fix EFI_IPv4_ADDRESS usages to use a macro to copy the structure instead of direct assignment, to avoid runtime alignment errors. - Delete excess local variables that are initialized but otherwise unused. - Add LibraryClasses.ARM & AARCH64 section in NetworkPkg.dsc file, containing a CompilerIntrinsicsLib null-library, required for successful standalone package builds (copied from MdeModulePkg.dsc). Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Randy Pawell <randy_pawell@hp.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16472 6f19259b-4bc3-4df7-8a09-765794883524
* 1. Update PXE driver to support PXEv6 boot cross subnet.Fu, Siyuan2014-09-181-32/+248
| | | | | | | | | | | 2. Update IP6 driver to use previous configured prefix length if a pre-exist IP6 address with unspecified prefix length. 3. Add NULL check for Dhcp protocol pointer before it decline the address in Ip6ConfigSetStatefulAddrCallback() function. 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> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16131 6f19259b-4bc3-4df7-8a09-765794883524
* Fix typo in function name PxeBcFlushStaionIp which should be ↵Mauro Faccenda2014-04-231-2/+2
| | | | | | | | | | | PxeBcFlushStationIp. Signed-off-by: Mauro Faccenda <faccenda@gmail.com> Reviewed-by: Ye, Ting <ting.ye@intel.com> Reviewed-by: Fu, Siyuan <siyuan.fu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15480 6f19259b-4bc3-4df7-8a09-765794883524
* 1. Fix a bug in PXE driver that the PXE boot do not restart if a new boot ↵sfu52012-10-171-1/+1
| | | | | | | | | | | | | | | option on the different IP stack is selected. 2. Retrieve the IP information after iSCSI TCPv6 connection established and fill it into iBFT table. 3. Generate a random IAID for each NIC port to require different IPv6 address in PXE driver. 4. Update function EfiMtftp6Configure() and Mtftp6RrqHandleOack() to allocate at most one UdpIo. 5. Fix a typo from “destory” to “destroy” in network code. Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Ouyang Qian <qian.ouyang@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13859 6f19259b-4bc3-4df7-8a09-765794883524
* Update PXE driver to wait for IPv6 duplicate address detection to finish.sfu52012-07-041-2/+73
| | | | | | | | Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: qianouyang <qian.ouyang@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13485 6f19259b-4bc3-4df7-8a09-765794883524
* 1. Fix a bug for PXEv6 when Proxy PXE server and DHCP server are located at ↵sfu52012-02-071-15/+31
| | | | | | | | | | the same server. Signed-off-by: sfu5 Reviewed-by: tye Reviewed-by: qianouyang git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12985 6f19259b-4bc3-4df7-8a09-765794883524
* Reconfigure the UdpRead instance if an error occurred in Dhcp, Discover and ↵sfu52011-12-161-0/+12
| | | | | | | | | | Mtftp process. Signed-off-by: sfu5 Reviewed-by: qianouyang Reviewed-by: tye git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12884 6f19259b-4bc3-4df7-8a09-765794883524
* NetworkPkg/UefiPxeBcDxe: Fix GCC build issuejljusten2011-09-101-5/+5
| | | | | | | | | | | The call to AsciiStrStr on line 330 requires a CHAR8* input, and since strings are being parsed, CHAR8* is more appropriate for BootFileName and BootFileNamePtr. Signed-off-by: jljusten Reviewed-by: lgrosenb git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12321 6f19259b-4bc3-4df7-8a09-765794883524
* 1. Support netboot6 tftp URL format like ↵sfu52011-09-091-0/+12
| | | | | | | | | | | | tftp://[aaaa::bbbb]/myfile.efi;mode=octet, other mode is rejected. 2. Fix bug in PXE driver UdpRead function to handle the IP fragmentation. Signed-off-by: sfu5 Reviewed-by: xdu2 Reviewed-by: hhuan13 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12308 6f19259b-4bc3-4df7-8a09-765794883524
* 1.Fix a icc build breakhhuan132011-08-161-1/+1
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12141 6f19259b-4bc3-4df7-8a09-765794883524
* 1. Fix bugs for PXE-IPv6 to accommodate the situation: hhuan132011-08-121-19/+257
| | | | | | | | | | | | 1.1 Proxy DHCP6 service and DHCP6 service on different servers. 1.2 Proxy DHCP6 server with Response Delay setting. 2. Update to support percent-encoding in NBP file name in netboot6 BootFileURL. Signed-off-by: hhuan13 Reviewed-by: xdu2, tye git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12122 6f19259b-4bc3-4df7-8a09-765794883524
* Fixed a bug for OPTION_NII(62) defined in RFC 5970.hhuan132010-12-031-2/+1
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11116 6f19259b-4bc3-4df7-8a09-765794883524
* Fix PxeBcDhcp6.c comments since official UEFI 2.3 Errata D spec is published.hhuan132010-11-161-3/+2
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11060 6f19259b-4bc3-4df7-8a09-765794883524
* Add NetworkPkg (P.UDK2010.UP3.Network.P1)hhtian2010-11-011-0/+1531
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10986 6f19259b-4bc3-4df7-8a09-765794883524