Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Misleading RFC 5970 Reference in Boot File URL Comment #10742

Open
1 of 5 tasks
florath opened this issue Feb 9, 2025 · 0 comments
Open
1 of 5 tasks

[Bug]: Misleading RFC 5970 Reference in Boot File URL Comment #10742

florath opened this issue Feb 9, 2025 · 0 comments

Comments

@florath
Copy link

florath commented Feb 9, 2025

Is there an existing issue for this?

  • I have searched existing issues

Bug Type

  • Firmware
  • Tool
  • Unit Test

Code first?

  • Yes

What packages are impacted?

NetworkPkg

Which targets are impacted by this bug?

No response

Current Behavior

The comment in the boot file URL extraction function suggests that the Boot File URL is limited to a TFTP format (tftp://[SERVER_ADDRESS]/BOOTFILE_NAME or tftp://domain_name/BOOTFILE_NAME). RFC 5970 states that no protocol constraint exists aside from URL formatting and recommends HTTP for downloading boot files, not TFTP. This may mislead developers regarding supported protocols and intended implementations.

PxeBcDhcp6.c:417ff

  //
  // Based upon RFC 5970 and UEFI 2.6, bootfile-url format can be
  // tftp://[SERVER_ADDRESS]/BOOTFILE_NAME or tftp://domain_name/BOOTFILE_NAME
  // As an example where the BOOTFILE_NAME is the EFI loader and
  // SERVER_ADDRESS is the ASCII encoding of an IPV6 address.
  //

Expected Behavior

Comments should accurately describe that the Boot File URL option does not restrict the download protocol and that HTTP is recommended for network boot loaders.

Steps To Reproduce

  1. Review the comment in the function referencing RFC 5970.
  2. Compare with RFC 5970's "Download Protocol Considerations" section.

Build Environment

none - Code Review after a crash of my BIOS

Version Information

Current head.
Commit: 1f1182c396466300ad6659c42b517542c61706d9

Urgency

Low

Are you going to fix this?

Someone else needs to fix it

Do you need maintainer feedback?

Maintainer feedback requested

Anything else?

A comment could be changed to:

//
// According to RFC 5970, the Boot File URL option does not restrict the download protocol,
// but only requires a valid URL. Although HTTP is recommended for network booting, the URL
// may also follow a TFTP-style format. This function expects URLs of the form:
//     protocol://[SERVER_ADDRESS]/BOOTFILE_NAME  or
//     protocol://domain_name/BOOTFILE_NAME
// where SERVER_ADDRESS is an ASCII-encoded IPv6 address and BOOTFILE_NAME typically denotes
// the EFI loader.
//
// Note: Currently, only the TFTP protocol is implemented.
//

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant