From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DB865C77B61 for ; Mon, 10 Apr 2023 19:35:42 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5FD438450D; Mon, 10 Apr 2023 21:35:24 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b="eJ/TnELQ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6750D8450D; Mon, 10 Apr 2023 21:35:15 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by phobos.denx.de (Postfix) with ESMTP id 33E4E83653 for ; Mon, 10 Apr 2023 21:35:11 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=emohandesi@linux.microsoft.com Received: from linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net (linux.microsoft.com [13.77.154.182]) by linux.microsoft.com (Postfix) with ESMTPSA id F17182174E2A; Mon, 10 Apr 2023 12:35:09 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com F17182174E2A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1681155310; bh=PmVzvJ0LO71Zmznz5S454eqmIGbbYdrZZdb73exW338=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eJ/TnELQHsDkS0T3he0jA/7htdwmlnA3vYOGGZX2JVuUq8H4caBznz4bbSC7gW4Nj Yxp8YZVH+3a1M4SmCzl1LRSyyUyKA2Hash9ydimgZYlLSSL6MXYvGvlB0Dg4Rnx8F/ PXZs0a2nh/9ciJNQxV6w47PjmNAGA2lb2+K+DvQc= From: emohandesi@linux.microsoft.com To: u-boot@lists.denx.de Cc: joe.hershberger@ni.com, rfried.dev@gmail.com, sjg@chromium.org, xypron.glpk@gmx.de, ilias.apalodimas@linaro.org, masahisa.kojima@linaro.org, tobias@waldekranz.com, john@metanate.com, v.v.mitrofanov@yadro.com, saproj@gmail.com, mario.six@gdsys.cc Subject: [PATCH v2 0/4] Add IPv6 Network Discovery Date: Mon, 10 Apr 2023 12:34:43 -0700 Message-Id: <1681155287-28437-1-git-send-email-emohandesi@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1677776290-11067-1-git-send-email-emohandesi@linux.microsoft.com> References: <1677776290-11067-1-git-send-email-emohandesi@linux.microsoft.com> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean From: Ehsan Mohandesi This series adds IPv6 network discovery to U-Boot. When an IPv6 command is run in U-Boot, it sends a router solicitation (RS) message to the network. The router on the network responds with a router advertisement (RA) message. Then U-Boot processes the RA message and sets the gatewayip6 and net_prefix_length environment variables. It is based on RFC 4861, but not everything in the RFC is supported here. https://www.rfc-editor.org/rfc/rfc4861 Changes in v2: - Improved IPv6 network discovery code. - Added IPv6 network discovery feature test (Python test). - Added unit tests (C code). Ehsan Mohandesi (4): Revert "net: ipv6: Add support for default gateway discovery." net: ipv6: Add support for default gateway discovery. test/py: IPv6 network discovery test test: eth: IPv6 network discovery unit test cmd/Kconfig | 6 + configs/sandbox64_defconfig | 2 + configs/sandbox_defconfig | 2 + configs/sandbox_flattree_defconfig | 2 + include/ndisc.h | 35 ++++++ include/net.h | 5 +- include/net6.h | 40 ++++++ net/ndisc.c | 243 +++++++++++++++++++++++++++++++++++-- net/net.c | 26 +++- net/net6.c | 1 + test/dm/eth.c | 88 ++++++++++++++ test/py/tests/test_net.py | 31 ++++- 12 files changed, 467 insertions(+), 14 deletions(-) -- 1.8.3.1