get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/2140269/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2140269,
    "url": "http://patchwork.ozlabs.org/api/patches/2140269/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20250922093629.2547703-4-jerome.forissier@linaro.org/",
    "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": "<20250922093629.2547703-4-jerome.forissier@linaro.org>",
    "list_archive_url": null,
    "date": "2025-09-22T09:35:43",
    "name": "[3/3] net: lwip: dhcp: set ntpserverip environment variable",
    "commit_ref": "61a6f5ab99197c8b1233de0ac9861bcae3d9df05",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "dc3c30da8c1d8f40fddec94193fea018609076cd",
    "submitter": {
        "id": 69192,
        "url": "http://patchwork.ozlabs.org/api/people/69192/?format=api",
        "name": "Jerome Forissier",
        "email": "jerome.forissier@linaro.org"
    },
    "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/20250922093629.2547703-4-jerome.forissier@linaro.org/mbox/",
    "series": [
        {
            "id": 474649,
            "url": "http://patchwork.ozlabs.org/api/series/474649/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=474649",
            "date": "2025-09-22T09:35:40",
            "name": "lwIP fixes (SNTP with DHCP)",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/474649/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2140269/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2140269/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 (2048-bit key;\n unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256\n header.s=google header.b=ibE5STZU;\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=linaro.org",
            "phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de",
            "phobos.denx.de;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=linaro.org header.i=@linaro.org header.b=\"ibE5STZU\";\n\tdkim-atps=neutral",
            "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=linaro.org",
            "phobos.denx.de;\n spf=pass smtp.mailfrom=jerome.forissier@linaro.org"
        ],
        "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))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4cVdLS4Dryz1yCt\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 22 Sep 2025 19:37:20 +1000 (AEST)",
            "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id D681E83429;\n\tMon, 22 Sep 2025 11:36:57 +0200 (CEST)",
            "by phobos.denx.de (Postfix, from userid 109)\n id DF18D833E8; Mon, 22 Sep 2025 11:36:54 +0200 (CEST)",
            "from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com\n [IPv6:2a00:1450:4864:20::42c])\n (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id E172683280\n for <u-boot@lists.denx.de>; Mon, 22 Sep 2025 11:36:52 +0200 (CEST)",
            "by mail-wr1-x42c.google.com with SMTP id\n ffacd0b85a97d-3f0134ccc0cso2953533f8f.1\n for <u-boot@lists.denx.de>; Mon, 22 Sep 2025 02:36:52 -0700 (PDT)",
            "from builder.. ([2a01:e0a:3cb:7bb0:fe8b:a136:2e69:4bd1])\n by smtp.gmail.com with ESMTPSA id\n ffacd0b85a97d-3ee07407d0asm19177840f8f.17.2025.09.22.02.36.51\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Mon, 22 Sep 2025 02:36:51 -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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED,\n SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=linaro.org; s=google; t=1758533812; x=1759138612; darn=lists.denx.de;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=X/DhXsGYeVAncwaZ9OfuvZAguKiUkU4uz221qxpx4kk=;\n b=ibE5STZUwW8e+L86I8KrQviYilnsMrlU6skEI0oSAXKAPODlT+W/L4nFcPBuR72+BF\n dKiKlqo8HSBCzhIXFVySC4CLtiRPJyEtTTE3jAGcMqcQ0DWPQnzwo1Pgq5mtkGPoSxwg\n G0QTmufm9DjXySlUzzNM3VN8k7ywqqI3bi/AfW3ehavDifvw4osL9IKcTGmvIayuDlvv\n 2OAhvXjGZx4TUX8WAaKw1dx/GGgpVanfwznMgk35o4cHKWRt2Zj/Lg+rMCxai2q5WbFg\n HDPYbDoDaj+myH+SHF7dlV/u6flGvHSjQy2NzLeUforMGlB8o74GwX8PcqDskzdyvBj7\n LHAw==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1758533812; x=1759138612;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n :subject:date:message-id:reply-to;\n bh=X/DhXsGYeVAncwaZ9OfuvZAguKiUkU4uz221qxpx4kk=;\n b=X3aj8bOwgmG8kX7x7xJwxPsUegb7HUzoOCDK8N/7dL1ATZIMNoT9HmBAf4qNs9Dmvj\n 0FoG/zCkAvke5Okwxk5G/2i7xrJE3l4nKnAP3PYGgFnBrQyuB422XzmoFidUANaYDvCS\n axdUocsI6aFXbtcaXlpCZ/APy99o9LzTi1usM1YnsllVj6Auk70CuHu4jI2k2aCsavfZ\n gZHjeSsnZTKWWG9C66HCyVB9mh8QQ2h2sWZKmJ64wLbe9J2HUmBqWgb0ZsNvBVMzJ+Et\n ygEMaZoNPHk7ayrPw8hVoRmEICm4HDI02O3F27jSay1wwgK0gsveb0AWN1R8fuNGqd4a\n w8+Q==",
        "X-Gm-Message-State": "AOJu0YxMhsrzLSVqSu36vxVJipHZSdajqdDRq5uKMk5+uwpDtnClKpeW\n k8E+QU9uDibtGCGAtk5MxJujx2mMJssaNsrK9U/F3XV1i8Px/EcCB+tNfXZyvhYSJOgj2GzEegD\n UfpntbNQ=",
        "X-Gm-Gg": "ASbGncuHm9uXIEvj65PixsnDYAVc2BF3p1wy3zJKDpEl2LSEv5IWg7niCVvqQwMxMh6\n 99Zhr15Bwc6O4APNQe4xZwcYaIROS8M6KKx/9dPi5mrDq36DyPvwaPEaIenjiF5rU8Vb6ZqXaIP\n llARx20+b7ApACOCoenecnTCA2uhFeb959RQM8x74vWI3UDicMTOj3zp2zK7O3eta1JXyzt1VoW\n eSh0QE5bGKL3PagLMn3Hg/16yPg5cqmX2IMgoxG2AaydjDlzbrmsE+5998XjBnE8vB6I2vY94Uu\n AtqL3C+0h/7+5xJQiq5W4S7vJCN6hVyVELsZhzavBBGnoinQLXdJFUQ6GejFrjvYV6cxXx+E9wY\n DEhHErdtiqm02RpYn37QVUiAnvOd27tk=",
        "X-Google-Smtp-Source": "\n AGHT+IGJwelGgdsl0j9AIDQNPV5N0ffg7nHvpLzHzYQ6WB9k+3Y6jYJN+KLXi7cQTJ5QlpQhDt3+GQ==",
        "X-Received": "by 2002:a05:6000:2888:b0:3ee:15c6:9a55 with SMTP id\n ffacd0b85a97d-3ee83da00dcmr8301011f8f.34.1758533812116;\n Mon, 22 Sep 2025 02:36:52 -0700 (PDT)",
        "From": "Jerome Forissier <jerome.forissier@linaro.org>",
        "To": "U-Boot mailing list <u-boot@lists.denx.de>",
        "Cc": "Michal Simek <michal.simek@amd.com>,\n Jerome Forissier <jerome.forissier@linaro.org>,\n Heinrich Schuchardt <xypron.glpk@gmx.de>,\n Ilias Apalodimas <ilias.apalodimas@linaro.org>,\n Joe Hershberger <joe.hershberger@ni.com>,\n Ramon Fried <rfried.dev@gmail.com>, Simon Glass <sjg@chromium.org>,\n Tim Harvey <tharvey@gateworks.com>, Tom Rini <trini@konsulko.com>,\n Wolfgang Wallner <wolfgang.wallner@br-automation.com>",
        "Subject": "[PATCH 3/3] net: lwip: dhcp: set ntpserverip environment variable",
        "Date": "Mon, 22 Sep 2025 11:35:43 +0200",
        "Message-ID": "<20250922093629.2547703-4-jerome.forissier@linaro.org>",
        "X-Mailer": "git-send-email 2.48.1",
        "In-Reply-To": "<20250922093629.2547703-1-jerome.forissier@linaro.org>",
        "References": "<20250922093629.2547703-1-jerome.forissier@linaro.org>",
        "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": "Once the DHCP exchange is complete, if we have an IP address for an NTP\nserver, set the ntpserverip environment variable accordingly. Although\nnot necessary to make the sntp command use that server (since it is\nknown internally to the lwIP stack), this makes the behavior in line\nwith the legacy NET stack. This is also consistent with exporting the\nDNS servers etc.\n\nSigned-off-by: Jerome Forissier <jerome.forissier@linaro.org>\nSuggested-by: Michal Simek <michal.simek@amd.com>\n---\n\n net/lwip/dhcp.c | 6 ++++++\n 1 file changed, 6 insertions(+)",
    "diff": "diff --git a/net/lwip/dhcp.c b/net/lwip/dhcp.c\nindex cbdfea3ba82a..531bf2c67057 100644\n--- a/net/lwip/dhcp.c\n+++ b/net/lwip/dhcp.c\n@@ -33,6 +33,7 @@ static int dhcp_loop(struct udevice *udev)\n \tchar ipstr[] = \"ipaddr\\0\\0\";\n \tchar maskstr[] = \"netmask\\0\\0\";\n \tchar gwstr[] = \"gatewayip\\0\\0\";\n+\tconst ip_addr_t *ntpserverip;\n \tunsigned long start;\n \tstruct netif *netif;\n \tstruct dhcp *dhcp;\n@@ -110,6 +111,11 @@ static int dhcp_loop(struct udevice *udev)\n \t\tstrncpy(boot_file_name, dhcp->boot_file_name,\n \t\t\tsizeof(boot_file_name));\n #endif\n+\tif (CONFIG_IS_ENABLED(CMD_SNTP)) {\n+\t\tntpserverip = sntp_getserver(1);\n+\t\tif (ntpserverip != IP_ADDR_ANY)\n+\t\t\tenv_set(\"ntpserverip\", ip4addr_ntoa(ntpserverip));\n+\t}\n \n \tprintf(\"DHCP client bound to address %pI4 (%lu ms)\\n\",\n \t       &dhcp->offered_ip_addr, get_timer(start));\n",
    "prefixes": [
        "3/3"
    ]
}