Message ID | 20230508171525.1082432-6-dimorinny@google.com |
---|---|
State | Superseded |
Delegated to: | Ramon Fried |
Headers | show
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; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20221208 header.b=sKK3fDXY; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QFSdm0k6Xz20fl for <incoming@patchwork.ozlabs.org>; Tue, 9 May 2023 03:17:16 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D67AC85FE8; Mon, 8 May 2023 19:16:11 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="sKK3fDXY"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E07EB8472A; Mon, 8 May 2023 19:16:09 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-yw1-x1149.google.com (mail-yw1-x1149.google.com [IPv6:2607:f8b0:4864:20::1149]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 92F0B8472A for <u-boot@lists.denx.de>; Mon, 8 May 2023 19:16:07 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=3Vi5ZZAkKBkEglprulqq1jrrjoh.frpx-errwolvwv.ghq0.gh@flex--dimorinny.bounces.google.com Received: by mail-yw1-x1149.google.com with SMTP id 00721157ae682-55a1aec6693so80480087b3.1 for <u-boot@lists.denx.de>; Mon, 08 May 2023 10:16:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1683566166; x=1686158166; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:from:to:cc:subject:date:message-id :reply-to; bh=cKfktSIGkcx2yiot5x4fmTw0uXf3lZzp2TCmaMfGs2c=; b=sKK3fDXYEITYXom+h87dUgwiC5f9/Hu1wWgP/d8xsRRa1yXuXUkODvCOJuRIqxLnfa VRxmeo7H/wcWjNTfaHdQyjNCWgV/ugz+MvyEl8LQk/oZd1kW016jONYEEHPJJtRa1fhY lIeWEAWpmY91C8YDbx8sRHYVY13MWbWWVKZp/FPChO2v2M/6pgoF7FWJOgNMMET9kWtb TqNE/0B+hAQPS19KeidLzfx5f88j8OGKp5OxE7EEulgVq1WTRlceFnZXLSUsxwt3Fip7 Zegq1QMa1YP1wOTwWLQuMZxUiF4TI81l/Svs6+JleHg3ZKghovVSG5cDu/8ybDWC1xhW t+pQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683566166; x=1686158166; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=cKfktSIGkcx2yiot5x4fmTw0uXf3lZzp2TCmaMfGs2c=; b=j9GJJyIIXmnk9z1GAh1xjjAbeyOC5SrEB83/YcHk0OFu9uLT+g/lMGgTgL6DbWxADY YOMoaM+dWzxSPuujvMGwmQgOfjuCb3zVRqtKONbRRK3hK3tMjYQAu0G+k2TUhi3skta1 nGTYmzQ4AWgM8RsY9CpE7oBmAE5tHS3C3N8cUS+pUXPkUE3tKUPZMnbC5KxlqVpypOmJ BbAH3AoI3IINSp2b5R0IA5kEbXYqtG/HgzHYQruCTkjIuJy5mA5E1iwqWrDVVrun6CDF 1RyNk6RHB5o1LYBk+nIe4Z2Yw5UVbjhHw9Dc1Lnepl8lST0/oMfRUD439eeYBnvDh7Dy F4pQ== X-Gm-Message-State: AC+VfDwSejuIkGGT53FeEZ0FHbn3BIRvtDenVPUz2305a8cnHVZGUB4s WhnyzRS3JrzuyCMWo81ynPwNbiJVOSDwXtvlYIRPgJlVmQuq5qnlGUGpMhRbhIjJJOTWWi4navn X2/4j4wd/+iYZMIxHsL7ja3DITxZsEvrQAKMifzTy/DRZqlshZf5HFwh5MwnhoIy+Fak= X-Google-Smtp-Source: ACHHUZ5oHGMbRAbRTlZaNURF/scfkBJ5cW1T+qVOD7QEUHzhj2hoskOvnpePPK41mfvM08yMxmSzCldMyOrhivM= X-Received: from dimorinny0.lon.corp.google.com ([2a00:79e0:d:209:f357:b9b:9cec:e681]) (user=dimorinny job=sendgmr) by 2002:a81:a9c5:0:b0:556:2da0:fb8 with SMTP id g188-20020a81a9c5000000b005562da00fb8mr6570116ywh.7.1683566166327; Mon, 08 May 2023 10:16:06 -0700 (PDT) Date: Mon, 8 May 2023 18:15:25 +0100 In-Reply-To: <20230508171525.1082432-1-dimorinny@google.com> Mime-Version: 1.0 References: <20230508171525.1082432-1-dimorinny@google.com> X-Mailer: git-send-email 2.40.1.521.gf1e218fcd8-goog Message-ID: <20230508171525.1082432-6-dimorinny@google.com> Subject: [PATCH 6/6] net: update net_ip6 from link_local address when eth device is changed From: Dmitrii Merkurev <dimorinny@google.com> To: u-boot@lists.denx.de Cc: rammuthiah@google.com, Dmitrii Merkurev <dimorinny@google.com>, Ying-Chun Liu <paul.liu@linaro.org>, Simon Glass <sjg@chromium.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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>, <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>, <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 |
Series |
[1/6] net: split IP_TCP header into separate IP/IP6 and TCP headers
|
expand
|
diff --git a/net/net.c b/net/net.c index 3fc6681898..a52c110d93 100644 --- a/net/net.c +++ b/net/net.c @@ -359,10 +359,10 @@ static int net_init_loop(void) if (IS_ENABLED(CONFIG_IPV6)) { ip6_make_lladdr(&net_link_local_ip6, net_ethaddr); - if (!memcmp(&net_ip6, &net_null_addr_ip6, - sizeof(struct in6_addr))) - memcpy(&net_ip6, &net_link_local_ip6, - sizeof(struct in6_addr)); + if (memcmp(&net_link_local_ip6, &net_null_addr_ip6, + sizeof(struct in6_addr))) { + net_copy_ip6(&net_ip6, &net_link_local_ip6); + } } } else
Current active eth device may be changed (due to ethprime), so make sure current net_ip6 is updated as a reaction. Signed-off-by: Dmitrii Merkurev <dimorinny@google.com> Cc: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org> Cc: Simon Glass <sjg@chromium.org> Сс: Joe Hershberger <joe.hershberger@ni.com> Сс: Ramon Fried <rfried.dev@gmail.com> --- net/net.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)