Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2144953/?format=api
{ "id": 2144953, "url": "http://patchwork.ozlabs.org/api/patches/2144953/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20251002-tftp-port-v1-1-96d04556b35c@pqrs.dk/", "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": "<20251002-tftp-port-v1-1-96d04556b35c@pqrs.dk>", "list_archive_url": null, "date": "2025-10-02T09:43:36", "name": "tftp: make TFTP ports unconditionally configurable", "commit_ref": "caa2ad6f8c8cc4c295c77aaff464c580d52c3ba6", "pull_url": null, "state": "accepted", "archived": false, "hash": "ef0413d21fdecb0c65e9d5fe7e32ff836e8f5a2e", "submitter": { "id": 82383, "url": "http://patchwork.ozlabs.org/api/people/82383/?format=api", "name": "Alvin Šipraga", "email": "alvin@pqrs.dk" }, "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/20251002-tftp-port-v1-1-96d04556b35c@pqrs.dk/mbox/", "series": [ { "id": 476044, "url": "http://patchwork.ozlabs.org/api/series/476044/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=476044", "date": "2025-10-02T09:43:36", "name": "tftp: make TFTP ports unconditionally configurable", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/476044/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2144953/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2144953/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=pqrs.dk header.i=@pqrs.dk header.a=rsa-sha256\n header.s=key1 header.b=Hh5xZdPS;\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=none (p=none dis=none) header.from=pqrs.dk", "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=pqrs.dk header.i=@pqrs.dk header.b=\"Hh5xZdPS\";\n\tdkim-atps=neutral", "phobos.denx.de;\n dmarc=none (p=none dis=none) header.from=pqrs.dk", "phobos.denx.de; spf=pass smtp.mailfrom=alvin@pqrs.dk" ], "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 4ccsHD5rRBz1y1V\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 2 Oct 2025 22:56:08 +1000 (AEST)", "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 0CFDE828A2;\n\tThu, 2 Oct 2025 14:56:00 +0200 (CEST)", "by phobos.denx.de (Postfix, from userid 109)\n id E5CBA834D4; Thu, 2 Oct 2025 11:44:19 +0200 (CEST)", "from out-180.mta1.migadu.com (out-180.mta1.migadu.com\n [95.215.58.180])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id 0F0C6828A2\n for <u-boot@lists.denx.de>; Thu, 2 Oct 2025 11:44:16 +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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED,\n RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,\n SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2", "X-Report-Abuse": "Please report any abuse attempt to abuse@migadu.com and\n include these headers.", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=pqrs.dk; s=key1;\n t=1759398255;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding;\n bh=BvcmkaFUuu+nqXSm9G1JQmduvnVBsVq1mauvvHN8ztA=;\n b=Hh5xZdPS8nWxW9NjYG4clqE+je48mCLI4ODVKiPSyTUU9PjPiP/kHqjThHMpVOJdm0MV2c\n oTGraHA+RsYsQLcy3fKBxOzxCTKRQcsqGRUEpFjcuBxNAhETAFPiUjx6Q//WuTLVqBNZ4I\n opi/fjYTU86GLd0cjYPl1zJS1VyKh1OOygFT5tsjYP1L645exQqdZV1vpXiNX8RJmpBuWR\n dzOaYUQYJVDncRfE0id8MHPfEbSxSsdbZjxuXnsLf4bRcOzh2O8Wkt7imJy3S0OLnmomqt\n nE4cBHVXPE98gfISM+yWVmic33BBDVozk2PlPCkDUe3ALOPh8q015BN5dGW9cQ==", "From": "=?utf-8?q?Alvin_=C5=A0ipraga?= <alvin@pqrs.dk>", "Date": "Thu, 02 Oct 2025 11:43:36 +0200", "Subject": "[PATCH] tftp: make TFTP ports unconditionally configurable", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "8bit", "Message-Id": "<20251002-tftp-port-v1-1-96d04556b35c@pqrs.dk>", "X-B4-Tracking": "v=1; b=H4sIAEdJ3mgC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE\n vPSU3UzU4B8JSMDI1NDAwMj3ZK0kgLdgvyiEl3DVAvzRHPLRDODJHMloPqCotS0zAqwWdGxtbU\n AEQTxyFsAAAA=", "X-Change-ID": "20251002-tftp-port-1e87a79a60b7", "To": "u-boot@lists.denx.de", "Cc": "=?utf-8?q?Alvin_=C5=A0ipraga?= <alvin@pqrs.dk>", "X-Migadu-Flow": "FLOW_OUT", "X-Mailman-Approved-At": "Thu, 02 Oct 2025 14:55:58 +0200", "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": "A few lines of code being guarded by the CONFIG_TFTP_PORT option seems\nan unnecessary restriction on the TFTP support provided by a vanilla\nU-Boot image. In cases where the TFTP server cannot run as superuser -\nand hence cannot run on the well-known port 69 - this quirk incurs a\nfull reconfiguration and rebuild of the bootloader only in order to\nselect the appropriate destination port.\n\nRemove the CONFIG_TFTP_PORT option entirely and make the tftpdstp and\ntftpsrcp variables always have an effect. Their being unset will mean\nthat U-Boot behaves the same as if CONFIG_TFTP_PORT was unset. Update\nthe documentation accordingly. And fix up the single board which was\noriginally enabling this option.\n\nSigned-off-by: Alvin Šipraga <alvin@pqrs.dk>\n---\n---\n configs/gurnard_defconfig | 1 -\n doc/usage/cmd/tftpput.rst | 8 ++------\n net/Kconfig | 18 ------------------\n net/tftp.c | 3 +--\n 4 files changed, 3 insertions(+), 27 deletions(-)", "diff": "diff --git a/configs/gurnard_defconfig b/configs/gurnard_defconfig\nindex bde531a6003a2d7167767b3f509876137c7da1a8..85643f249aed65071005a157658c3dc11f44c619 100644\n--- a/configs/gurnard_defconfig\n+++ b/configs/gurnard_defconfig\n@@ -42,7 +42,6 @@ CONFIG_ENV_OVERWRITE=y\n CONFIG_ENV_IS_IN_NAND=y\n CONFIG_ENV_RELOC_GD_ENV_ADDR=y\n CONFIG_NET_RETRY_COUNT=20\n-CONFIG_TFTP_PORT=y\n CONFIG_TFTP_TSIZE=y\n CONFIG_AT91_GPIO=y\n CONFIG_GENERIC_ATMEL_MCI=y\ndiff --git a/doc/usage/cmd/tftpput.rst b/doc/usage/cmd/tftpput.rst\nindex 351c9faa38b9d8357c0e200d8cebd1f90344e0a6..2bcb3032cb2444926da28454eefdb2b128a7389f 100644\n--- a/doc/usage/cmd/tftpput.rst\n+++ b/doc/usage/cmd/tftpput.rst\n@@ -19,9 +19,8 @@ Description\n The tftpput command is used to transfer a file to a TFTP server.\n \n By default the destination port is 69 and the source port is pseudo-random.\n-If CONFIG_TFTP_PORT=y, the environment variable *tftpsrcp* can be used to set\n-the source port and the environment variable *tftpdstp* can be used to set\n-the destination port.\n+The environment variable *tftpsrcp* can be used to set the source port and the\n+environment variable *tftpdstp* can be used to set the destination port.\n \n address\n memory address where the data starts\n@@ -75,9 +74,6 @@ The command is only available if CONFIG_CMD_TFTPPUT=y.\n CONFIG_TFTP_BLOCKSIZE defines the size of the TFTP blocks sent. It defaults\n to 1468 matching an ethernet MTU of 1500.\n \n-If CONFIG_TFTP_PORT=y, the environment variables *tftpsrcp* and *tftpdstp* can\n-be used to set the source and the destination ports.\n-\n CONFIG_TFTP_WINDOWSIZE can be used to set the TFTP window size of transmits\n after which an ACK response is required. The window size defaults to 1.\n \ndiff --git a/net/Kconfig b/net/Kconfig\nindex 40ec6bbce7614afde5a2a9f90d431f19a3654a41..7ba64d43b398415825921e7b61dc4c81e986618a 100644\n--- a/net/Kconfig\n+++ b/net/Kconfig\n@@ -60,24 +60,6 @@ config SYS_FAULT_ECHO_LINK_DOWN\n \t this option is active, then CONFIG_SYS_FAULT_MII_ADDR also needs to\n \t be configured.\n \n-config TFTP_PORT\n-\tbool \"Set TFTP UDP source/destination ports via the environment\"\n-\thelp\n-\t If this is defined, the environment variable tftpsrcp is used to\n-\t supply the TFTP UDP source port value. If tftpsrcp isn't defined,\n-\t the normal pseudo-random port number generator is used.\n-\n-\t Also, the environment variable tftpdstp is used to supply the TFTP\n-\t UDP destination port value. If tftpdstp isn't defined, the normal\n-\t port 69 is used.\n-\n-\t The purpose for tftpsrcp is to allow a TFTP server to blindly start\n-\t the TFTP transfer using the pre-configured target IP address and UDP\n-\t port. This has the effect of \"punching through\" the (Windows XP)\n-\t firewall, allowing the remainder of the TFTP transfer to proceed\n-\t normally. A better solution is to properly configure the firewall,\n-\t but sometimes that is not allowed.\n-\n config TFTP_WINDOWSIZE\n \tint \"TFTP window size\"\n \tdefault 1\ndiff --git a/net/tftp.c b/net/tftp.c\nindex 1ca9a5ea7cf6bac562006e2506ebcb17996a8c36..1760877107faef57107cb04c484157750ff63602 100644\n--- a/net/tftp.c\n+++ b/net/tftp.c\n@@ -926,14 +926,13 @@ void tftp_start(enum proto_t protocol)\n \t/* Use a pseudo-random port unless a specific port is set */\n \ttftp_our_port = 1024 + (get_timer(0) % 3072);\n \n-#ifdef CONFIG_TFTP_PORT\n \tep = env_get(\"tftpdstp\");\n \tif (ep != NULL)\n \t\ttftp_remote_port = simple_strtol(ep, NULL, 10);\n \tep = env_get(\"tftpsrcp\");\n \tif (ep != NULL)\n \t\ttftp_our_port = simple_strtol(ep, NULL, 10);\n-#endif\n+\n \ttftp_cur_block = 0;\n \ttftp_windowsize = 1;\n \ttftp_last_nack = 0;\n", "prefixes": [] }