Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2064828/?format=api
{ "id": 2064828, "url": "http://patchwork.ozlabs.org/api/patches/2064828/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20250324204845.25603-1-seanedmond@linux.microsoft.com/", "project": { "id": 18, "url": "http://patchwork.ozlabs.org/api/projects/18/?format=api", "name": "U-Boot", "link_name": "uboot", "list_id": "u-boot.lists.denx.de", "list_email": "u-boot@lists.denx.de", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20250324204845.25603-1-seanedmond@linux.microsoft.com>", "list_archive_url": null, "date": "2025-03-24T20:48:45", "name": "[v2] net: dhcp6: Send DHCPv6 using multicast MAC", "commit_ref": "9a6964e419c0a533e1ca5d224221e440093a9e5f", "pull_url": null, "state": "accepted", "archived": false, "hash": "5ee252141af36316ffcc231daf3b8b4de3c88112", "submitter": { "id": 85528, "url": "http://patchwork.ozlabs.org/api/people/85528/?format=api", "name": "Sean Edmond", "email": "seanedmond@linux.microsoft.com" }, "delegate": { "id": 157425, "url": "http://patchwork.ozlabs.org/api/users/157425/?format=api", "username": "jforissier", "first_name": "Jerome", "last_name": "Forissier", "email": "jerome.forissier@linaro.org" }, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20250324204845.25603-1-seanedmond@linux.microsoft.com/mbox/", "series": [ { "id": 449808, "url": "http://patchwork.ozlabs.org/api/series/449808/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=449808", "date": "2025-03-24T20:48:45", "name": "[v2] net: dhcp6: Send DHCPv6 using multicast MAC", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/449808/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2064828/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2064828/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<u-boot-bounces@lists.denx.de>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=linux.microsoft.com header.i=@linux.microsoft.com\n header.a=rsa-sha256 header.s=default header.b=Lx3OjTuI;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)", "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=linux.microsoft.com", "phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de", "phobos.denx.de;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=linux.microsoft.com header.i=@linux.microsoft.com\n header.b=\"Lx3OjTuI\";\n\tdkim-atps=neutral", "phobos.denx.de; dmarc=pass (p=none dis=none)\n header.from=linux.microsoft.com", "phobos.denx.de;\n spf=pass smtp.mailfrom=seanedmond@linux.microsoft.com" ], "Received": [ "from phobos.denx.de (phobos.denx.de\n [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4ZM4sR6GFCz1yGn\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 25 Mar 2025 07:48:59 +1100 (AEDT)", "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 12A5980EEF;\n\tMon, 24 Mar 2025 21:48:52 +0100 (CET)", "by phobos.denx.de (Postfix, from userid 109)\n id 9B86580F70; Mon, 24 Mar 2025 21:48:50 +0100 (CET)", "from linux.microsoft.com (linux.microsoft.com [13.77.154.182])\n by phobos.denx.de (Postfix) with ESMTP id 3818A809D0\n for <u-boot@lists.denx.de>; Mon, 24 Mar 2025 21:48:48 +0100 (CET)", "from LAPTOP-HS0II3UH.corp.microsoft.com\n (d66-183-145-126.bchsia.telus.net [66.183.145.126])\n by linux.microsoft.com (Postfix) with ESMTPSA id 3256B2036563;\n Mon, 24 Mar 2025 13:48:47 -0700 (PDT)" ], "X-Spam-Checker-Version": "SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de", "X-Spam-Level": "", "X-Spam-Status": "No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_BLOCKED,\n RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED,\n SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2", "DKIM-Filter": "OpenDKIM Filter v2.11.0 linux.microsoft.com 3256B2036563", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com;\n s=default; t=1742849327;\n bh=uBK4Clbfiu/XPvtop36sfpe1cf6SehhKyZoB03/0qak=;\n h=From:To:Cc:Subject:Date:From;\n b=Lx3OjTuISZifqKp6ngJFkp8FcFDZWrSISt7j/l4PP+mA+uNpuTfmjyoizbzBW7P3T\n qMgYZFEPSbpXFH7f3useyLmZtXWv3e5Kcojo/XsVpLtSMwHNri8PlvVHN/KTMBkpcm\n 5EJWUZiSNDg0dHfyRQ1ovEY6f13exKRFokAWaJ8c=", "From": "seanedmond@linux.microsoft.com", "To": "u-boot@lists.denx.de", "Cc": "joe.hershberger@ni.com,\n\trfried.dev@gmail.com,\n\ttrini@konsulko.com", "Subject": "[PATCH v2] net: dhcp6: Send DHCPv6 using multicast MAC", "Date": "Mon, 24 Mar 2025 13:48:45 -0700", "Message-Id": "<20250324204845.25603-1-seanedmond@linux.microsoft.com>", "X-Mailer": "git-send-email 2.25.1", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-BeenThere": "u-boot@lists.denx.de", "X-Mailman-Version": "2.1.39", "Precedence": "list", "List-Id": "U-Boot discussion <u-boot.lists.denx.de>", "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=unsubscribe>", "List-Archive": "<https://lists.denx.de/pipermail/u-boot/>", "List-Post": "<mailto:u-boot@lists.denx.de>", "List-Help": "<mailto:u-boot-request@lists.denx.de?subject=help>", "List-Subscribe": "<https://lists.denx.de/listinfo/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=subscribe>", "Errors-To": "u-boot-bounces@lists.denx.de", "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>", "X-Virus-Scanned": "clamav-milter 0.103.8 at phobos.denx.de", "X-Virus-Status": "Clean" }, "content": "From: Sean Edmond <seanedmond@microsoft.com>\n\nIn IPv6, the broadcast MAC address is not used. Instead, it should use\nthe multicast address (see RFC RFC2464).\n\nAdd IPV6_ALL_NODE_ETH_ADDR macro for clarity.\n\nSigned-off-by: Sean Edmond <seanedmond@microsoft.com>\n---\n include/net6.h | 10 ++++++++++\n net/dhcpv6.c | 12 ++++++------\n net/dhcpv6.h | 8 +++++++-\n 3 files changed, 23 insertions(+), 7 deletions(-)", "diff": "diff --git a/include/net6.h b/include/net6.h\nindex 1ed989e584a..2ceeaba0639 100644\n--- a/include/net6.h\n+++ b/include/net6.h\n@@ -90,6 +90,16 @@ struct udp_hdr {\n \t\t\t\t 0x00, 0x00, 0x00, 0x00, \\\n \t\t\t\t 0x00, 0x00, 0x00, 0x00, \\\n \t\t\t\t 0x00, 0x00, 0x00, 0x02 } } }\n+/*\n+ * With IPv6, the broadcast MAC address is not used. Instead, it should use\n+ * the multicast address (see RFC RFC2464 section 7)\n+ */\n+#define IPV6_ALL_NODE_ETH_ADDR(_ip6_addr) {0x33, \\\n+\t\t\t\t 0x33, \\\n+\t\t\t\t _ip6_addr.in6_u.u6_addr8[12], \\\n+\t\t\t\t _ip6_addr.in6_u.u6_addr8[13], \\\n+\t\t\t\t _ip6_addr.in6_u.u6_addr8[14], \\\n+\t\t\t\t _ip6_addr.in6_u.u6_addr8[15]}\n \n #define IPV6_LINK_LOCAL_PREFIX\t0xfe80\n #define IPV6_LINK_LOCAL_MASK\t0xffb0 /* The first 10-bit of address mask. */\ndiff --git a/net/dhcpv6.c b/net/dhcpv6.c\nindex 54619ee6983..984a64a4ff3 100644\n--- a/net/dhcpv6.c\n+++ b/net/dhcpv6.c\n@@ -29,6 +29,10 @@\n int updated_sol_max_rt_ms = SOL_MAX_RT_MS;\n /* state machine parameters/variables */\n struct dhcp6_sm_params sm_params;\n+/* DHCPv6 all server IP6 address */\n+const struct in6_addr dhcp_mcast_ip6 = DHCP6_MULTICAST_ADDR;\n+/* IPv6 multicast ethernet address */\n+const u8 net_dhcp6_mcast_ethaddr[6] = IPV6_ALL_NODE_ETH_ADDR(dhcp_mcast_ip6);\n \n static void dhcp6_state_machine(bool timeout, uchar *rx_pkt, unsigned int len);\n \n@@ -171,7 +175,6 @@ static int dhcp6_add_option(int option_id, uchar *pkt)\n */\n static void dhcp6_send_solicit_packet(void)\n {\n-\tstruct in6_addr dhcp_bcast_ip6;\n \tint len = 0;\n \tuchar *pkt;\n \tuchar *dhcp_pkt_start_ptr;\n@@ -200,9 +203,8 @@ static void dhcp6_send_solicit_packet(void)\n \tlen = pkt - dhcp_pkt_start_ptr;\n \n \t/* send UDP packet to DHCP6 multicast address */\n-\tstring_to_ip6(DHCP6_MULTICAST_ADDR, sizeof(DHCP6_MULTICAST_ADDR), &dhcp_bcast_ip6);\n \tnet_set_udp_handler(dhcp6_handler);\n-\tnet_send_udp_packet6((uchar *)net_bcast_ethaddr, &dhcp_bcast_ip6,\n+\tnet_send_udp_packet6((uchar *)net_dhcp6_mcast_ethaddr, (struct in6_addr *)&dhcp_mcast_ip6,\n \t\t\t PORT_DHCP6_S, PORT_DHCP6_C, len);\n }\n \n@@ -218,7 +220,6 @@ static void dhcp6_send_solicit_packet(void)\n */\n static void dhcp6_send_request_packet(void)\n {\n-\tstruct in6_addr dhcp_bcast_ip6;\n \tint len = 0;\n \tuchar *pkt;\n \tuchar *dhcp_pkt_start_ptr;\n@@ -252,9 +253,8 @@ static void dhcp6_send_request_packet(void)\n \tlen = pkt - dhcp_pkt_start_ptr;\n \n \t/* send UDP packet to DHCP6 multicast address */\n-\tstring_to_ip6(DHCP6_MULTICAST_ADDR, strlen(DHCP6_MULTICAST_ADDR), &dhcp_bcast_ip6);\n \tnet_set_udp_handler(dhcp6_handler);\n-\tnet_send_udp_packet6((uchar *)net_bcast_ethaddr, &dhcp_bcast_ip6,\n+\tnet_send_udp_packet6((uchar *)net_dhcp6_mcast_ethaddr, (struct in6_addr *)&dhcp_mcast_ip6,\n \t\t\t PORT_DHCP6_S, PORT_DHCP6_C, len);\n }\n \ndiff --git a/net/dhcpv6.h b/net/dhcpv6.h\nindex 65c8e4c71d3..d41a3c30615 100644\n--- a/net/dhcpv6.h\n+++ b/net/dhcpv6.h\n@@ -40,7 +40,13 @@\n /* vendor-class-data to send in vendor clas option */\n #define DHCP6_VCI_STRING\t\"U-Boot\"\n \n-#define DHCP6_MULTICAST_ADDR\t\"ff02::1:2\"\t/* DHCP multicast address */\n+/*\n+ * All-DHCPv6 server multicast address\n+ */\n+#define DHCP6_MULTICAST_ADDR { { { 0xFF, 0x02, 0x00, 0x00, \\\n+\t\t\t\t\t\t\t\t 0x00, 0x00, 0x00, 0x00, \\\n+\t\t\t\t\t\t\t\t 0x00, 0x00, 0x00, 0x00, \\\n+\t\t\t\t\t\t\t\t 0x00, 0x01, 0x00, 0x02 } } }\n \n /* DHCP6 States supported */\n enum dhcp6_state {\n", "prefixes": [ "v2" ] }