Skip to content

UEFI IPv6 and DHCPv6 support

Javier Martinez Canillas grub-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4net: read bracketed ipv6 addrs and port numbersgrub-core/net/http.c grub-core/net/net.c grub-core/net/tftp.c +1 more+109 -110 replies
2/4bootp: New net_bootp6 commandgrub-core/net/bootp.c grub-core/net/ip.c grub-core/net/net.c +2 more+1106 -10 replies
3/4efinet: UEFI IPv6 PXE supportgrub-core/net/drivers/efi/efinet.c include/grub/efi/api.h+177 -145 replies
4/4grub.texi: Add net_bootp6 documentdocs/grub.texi+19 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] UEFI IPv6 and DHCPv6 support

Hello,

This series contains patches that come from the SUSE package that adds a net_bootp6 command to auto configure the network interfaces by using the DHCPv6 protocol. They also add support to do the auto configuration when GRUB is booted from UEFI IPv6 PXE.

We have been carrying these for a long time in our grub2 package and is also used by other distros such as Debian and Ubuntu. Michael Chang posted them in 2016 but were never merged:

https://lists.gnu.org/archive/html/grub-devel/2016-08/msg00000.html

Without these patches, booting GRUB from a UEFI PXEv6 boot entry leads to a wrong network configuration and GRUB not being able to fetch its config file over TFTP. For example, the following variables are incorrectly set:

cmdpath=(tftp,0.5.0.24)d:beef:a::1]/netboot net_default_ip=0.0.0.0 net_default_mac=be:ef:00:0a:00:00 net_default_server=0.5.0.24 net_efinet0_boot_file=d:beef:a::1]/netboot/grubx64.efi net_efinet0_ip=0.0.0.0 net_efinet0_mac=be:ef:00:0a:00:00 net_efinet0_next_server=0.5.0.24 prefix=(tftp,0.5.0.24)/netboot pxe_default_server=0.5.0.24 root=tftp,0.5.0.24

With these changes, the network interface is correctly configured and GRUB is able to fetch its config file. The network variables are correctly set:

cmdpath=(tftp,2000:dead:beef:a::1)/netboot
net_default_ip=2000:dead:beef:a:0:0:0:2000
net_default_mac=52:54:00:2c:dc:9e
net_default_server=2000:dead:beef:a::1
net_efinet0_boot_file=/netboot/grubx64.efi
net_efinet0_ip=2000:dead:beef:a:0:0:0:2000
net_efinet0_mac=52:54:00:2c:dc:9e
prefix=(tftp,2000:dead:beef:a::1)/netboot
pxe_default_server=2000:dead:beef:a::1
root=tftp,2000:dead:beef:a::1

Aaron Miller (1):
net: read bracketed ipv6 addrs and port numbers

Michael Chang (3):
bootp: New net_bootp6 command
efinet: UEFI IPv6 PXE support
grub.texi: Add net_bootp6 document

 docs/grub.texi                     |  19 +
 grub-core/net/bootp.c              | 914 ++++++++++++++++++++++++++++-
 grub-core/net/drivers/efi/efinet.c |  45 +-
 grub-core/net/http.c               |  25 +-
 grub-core/net/ip.c                 |  39 ++
 grub-core/net/net.c                | 159 ++++-
 grub-core/net/tftp.c               |  10 +-
 include/grub/efi/api.h             | 146 ++++-
 include/grub/net.h                 |  80 +++
 9 files changed, 1411 insertions(+), 26 deletions(-)
Signature · 1 line
2.26.2