Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1jgkNk-00089E-SC for mharc-grub-devel@gnu.org; Thu, 04 Jun 2020 03:33:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44836) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jgkNj-00087p-Lp for grub-devel@gnu.org; Thu, 04 Jun 2020 03:33:43 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:48018 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jgkNi-0002fb-GC for grub-devel@gnu.org; Thu, 04 Jun 2020 03:33:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591256021; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y7NLoFowajYCjS3ZmH2JTfMzHBmstRYf20talXdb+s4=; b=Bkf/Sa7ZYgk76k1/nL1IaRYqOlEpNtXOhc3lQbbvkUehLdyW3g05QUYascrL/EXsaC/kOX R8WnebHrW/poF5JsIFCL9EhEVIYuScgg46iw+HrvQlHf3HxeBvQ3NHE50/YH2Sg+Swu2+G kQ/N/BqEPUQcKmaKEog6cljGCoxWyuU= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-100-RyxIh_D0Nkye1SV-lMHLJQ-1; Thu, 04 Jun 2020 03:33:36 -0400 X-MC-Unique: RyxIh_D0Nkye1SV-lMHLJQ-1 Received: by mail-wm1-f72.google.com with SMTP id x6so1660876wmj.9 for ; Thu, 04 Jun 2020 00:33:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Y7NLoFowajYCjS3ZmH2JTfMzHBmstRYf20talXdb+s4=; b=AInOSGEtyYR5PRGxm9RashgKSaYU7QLnrswSSfFgnNStO3PYrIYNolv55dZuWOBqgJ ZgYht4M7EYcyJiS5rWlbXBIzdFwhrsbEWHKgUcfrfayaHBmPZxoHygEZPjHLMlyNfVPR YN72FJSuAarrPAJkGr3QIzDYTPNrf6BwfzsD9eXjuOCfqq8fuPl98wwaYGBdDMLu7IhF pbJFHZO59TIO8rWxTyDeOo8xA2BcpshT0c2YUm6pMRf1kk9PdXs4Iy5MsTQXUykTE+I3 vaYTHtJ7qkBGYwG+O371b9x1dZKI7hGqfQWe5B+eYzvZW7Vw7F//OzZg0GLYRYQ9w2kt 6HmQ== X-Gm-Message-State: AOAM533BN7/+1oPbKJCmYD6ifA13IBwnOWa1iuSqQr2v7mzeMlbvYKBC ACKqfpOr74FYw9r1B+c9E5IV9WG43jXzf7CO6UJonUmFPfh/sbp2w0DOa65iFbLpyvoBupU3KOB joYnjk4igG2s= X-Received: by 2002:a05:6000:10d2:: with SMTP id b18mr3030880wrx.366.1591256015228; Thu, 04 Jun 2020 00:33:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyPdNkiXFPjjp4LPZgSyZcS+TnF4eLR18Ki3GY3J8s9cE8Z86iGag6TYE3PB+7ovArq5kRVTA== X-Received: by 2002:a05:6000:10d2:: with SMTP id b18mr3030863wrx.366.1591256014904; Thu, 04 Jun 2020 00:33:34 -0700 (PDT) Received: from minerva.redhat.com ([2a01:c50f:ab80:6700:527f:85b3:5615:ff0b]) by smtp.gmail.com with ESMTPSA id e10sm6722779wrn.11.2020.06.04.00.33.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jun 2020 00:33:33 -0700 (PDT) From: Javier Martinez Canillas To: grub-devel@gnu.org Cc: Daniel Kiper , Michael Chang , Javier Martinez Canillas Subject: [PATCH 0/4] UEFI IPv6 and DHCPv6 support Date: Thu, 4 Jun 2020 09:33:22 +0200 Message-Id: <20200604073326.3255847-1-javierm@redhat.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=205.139.110.61; envelope-from=javierm@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/04 01:08:38 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jun 2020 07:33:43 -0000 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(-) -- 2.26.2