get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2227096,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2227096/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/openwrt/patch/20260423085233.221309-1-ckorber@tdt.de/",
    "project": {
        "id": 45,
        "url": "http://patchwork.ozlabs.org/api/1.1/projects/45/?format=api",
        "name": "OpenWrt development",
        "link_name": "openwrt",
        "list_id": "openwrt-devel.lists.openwrt.org",
        "list_email": "openwrt-devel@lists.openwrt.org",
        "web_url": "http://openwrt.org/",
        "scm_url": "git://git.openwrt.org/openwrt.git",
        "webscm_url": "https://dev.openwrt.org/browser"
    },
    "msgid": "<20260423085233.221309-1-ckorber@tdt.de>",
    "date": "2026-04-23T08:52:33",
    "name": "[ufp,v2] ufp: write oui info to ieee-oui.txt",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "64c9ccca83391baff389310a98cd2ec10d3a5ff7",
    "submitter": {
        "id": 92985,
        "url": "http://patchwork.ozlabs.org/api/1.1/people/92985/?format=api",
        "name": "Christian Korber",
        "email": "ckorber@tdt.de"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/openwrt/patch/20260423085233.221309-1-ckorber@tdt.de/mbox/",
    "series": [
        {
            "id": 501163,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/501163/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/openwrt/list/?series=501163",
            "date": "2026-04-23T08:52:33",
            "name": "[ufp,v2] ufp: write oui info to ieee-oui.txt",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/501163/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2227096/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2227096/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "\n <openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org>",
        "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 secure) header.d=lists.infradead.org header.i=@lists.infradead.org\n header.a=rsa-sha256 header.s=bombadil.20210309 header.b=ytlypP2u;\n\tdkim=temperror header.d=tdt.de header.i=@tdt.de header.a=rsa-sha256\n header.s=z1-selector1 header.b=F316xh9J;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org\n (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org;\n envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org;\n receiver=patchwork.ozlabs.org)"
        ],
        "Received": [
            "from bombadil.infradead.org (bombadil.infradead.org\n [IPv6:2607:7c80:54:3::133])\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 4g1VK54ZRCz1y2d\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 23 Apr 2026 18:54:49 +1000 (AEST)",
            "from localhost ([::1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1wFpnp-0000000BGnd-295q;\n\tThu, 23 Apr 2026 08:52:53 +0000",
            "from mxout70.expurgate.net ([91.198.224.70])\n\tby bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1wFpnm-0000000BGn4-231v\n\tfor openwrt-devel@lists.openwrt.org;\n\tThu, 23 Apr 2026 08:52:52 +0000",
            "from [194.37.255.9] (helo=mxout.expurgate.net)\n\tby relay.expurgate.net with smtp (Exim 4.92)\n\t(envelope-from <prvs=7587fbc53b=ckorber@tdt.de>)\n\tid 1wFpng-001uUM-Mc; Thu, 23 Apr 2026 10:52:44 +0200",
            "from [195.243.126.94] (helo=securemail.tdt.de)\n\tby relay.expurgate.net with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)\n\t(Exim 4.92)\n\t(envelope-from <ckorber@tdt.de>)\n\tid 1wFpng-006gC7-4y; Thu, 23 Apr 2026 10:52:44 +0200",
            "from securemail.tdt.de (localhost [127.0.0.1])\n\tby securemail.tdt.de (Postfix) with ESMTP id AC2DA240041;\n\tThu, 23 Apr 2026 10:52:43 +0200 (CEST)",
            "from mail.dev.tdt.de (unknown [10.2.4.42])\n\tby securemail.tdt.de (Postfix) with ESMTP id 14D5D240040;\n\tThu, 23 Apr 2026 10:52:37 +0200 (CEST)",
            "from PandoraBox.tdtnet.local (unknown [10.2.3.56])\n\tby mail.dev.tdt.de (Postfix) with ESMTPSA id AB602243B6;\n\tThu, 23 Apr 2026 10:52:36 +0200 (CEST)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type:\n\tList-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:\n\tMIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:\n\tReply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date\n\t:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner;\n\tbh=/CtC7PV4EGSLVcbxjV3VzoODOab6SJ7NsR4GJVIkK/o=; b=ytlypP2uDA0T/SXnom/eX+NzUw\n\ty4k+9PdRWHFUVRg54gCWg9e+uqPYP0yVIut8SFvAKGL8uF0SpDoUcXcUXrB4ho2slb+LcIZDqWtG+\n\tlX2COqXx+UjjxNN8M3cKZwqtMoIsvlZk0QcV8x00RlBLJ8WQSL0bomtqPuzTFDJw7vlM4Fb2rIWYI\n\tPx1U2jkdUe0Quj+s1qG4mmsv4PKciuQ+Ju64hKvVdgzP2yn5QoH5HEH+WCLW73ZyZtJdMiO64miix\n\tYJuUylxrTy8FeQxA2ams/xuGY9O2I+tt/ODDnfzGs1KSmfza4wwAw3Anzh5757C86KJpJaqj2iOcO\n\tETuIwWYg==;",
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=tdt.de;\n\ts=z1-selector1; t=1776934363;\n\tbh=H9R0rmg02+aMgULM/JLY5brnUQfmGEUTQOdWKItqbjA=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=F316xh9JGwLJQ7W3R3tytFSgGLGwx47oM5NiBW6QexUJ7kKifWXo9X7vtlI9xM9xs\n\t BPwBMc8miV7/MKdJEezwkuzjWvT2SpWLrtn5Kw1YlgsCsKSCnEGOaw6O0qlLaLhOUv\n\t yu7xt8/22Gs25uC+8X++cvj/2HoCt2zJjndObYg6O9hFnzE/57pPjTb6KSNUMYF7XU\n\t 3Tdo/fBpJ8fasPqBUwbyAmxpCqT1OJ91I0hUrr40HKi8zKErolCNk8IPFbhohRO5aQ\n\t s3+jCg5Rk/xn4SaJoTsevlQd3xW4AXi+9NzljNAOog6JKwSM851TnwbjU7DeVwbq0Q\n\t NOiIyusvITGQA=="
        ],
        "From": "Christian Korber <ckorber@tdt.de>",
        "To": "john@phrozen.org, nbd@nbd.name",
        "Cc": "openwrt-devel@lists.openwrt.org",
        "Subject": "[ufp v2] ufp: write oui info to ieee-oui.txt",
        "Date": "Thu, 23 Apr 2026 10:52:33 +0200 (CEST)",
        "Message-ID": "<20260423085233.221309-1-ckorber@tdt.de>",
        "X-Mailer": "git-send-email 2.47.3",
        "In-Reply-To": "<20260422145623.3474490-1-ckorber@tdt.de>",
        "References": "<20260422145623.3474490-1-ckorber@tdt.de>",
        "X-Spam-Status": "No, score=-1.0 required=5.0 tests=ALL_TRUSTED,URIBL_BLOCKED\n\tautolearn=ham autolearn_force=no version=3.4.2",
        "X-Spam-Checker-Version": "SpamAssassin 3.4.2 (2018-09-13) on mail.dev.tdt.de",
        "X-TBoneOriginalFrom": "Christian Korber <ckorber@tdt.de>",
        "X-TBoneOriginalTo": "john@phrozen.org, nbd@nbd.name",
        "X-TBoneOriginalCc": "openwrt-devel@lists.openwrt.org",
        "X-TBoneDomainSigned": "false",
        "MIME-Version": "1.0",
        "X-purgate-type": "clean",
        "X-purgate": "clean",
        "X-purgate-ID": "151534::1776934364-36755CE7-747ED3DA/0/0",
        "X-CRM114-Version": "20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ",
        "X-CRM114-CacheID": "sfid-20260423_015250_703907_763C3C41 ",
        "X-CRM114-Status": "GOOD (  20.36  )",
        "X-Spam-Score": "-2.8 (--)",
        "X-Spam-Report": "Spam detection software,\n running on the system \"bombadil.infradead.org\",\n has NOT identified this incoming email as spam.  The original\n message has been attached to this so you can view it or label\n similar future email.  If you have any questions, see\n the administrator of that system for details.\n Content preview:  This commit writes connected device's information (oui and\n    vendor) to ieee-oui.txt for arp-scan if export is set to true. This way\n there\n    is no unneccessary big file on the target. CHANGE to v1: corrected the\n patch\n    for upstream and included an option `export` to choose if it is activated.    \n Content analysis details:   (-2.8 points, 5.0 required)\n  pts rule name              description\n ---- ----------------------\n --------------------------------------------------\n -0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at https://www.dnswl.org/, low\n                             trust\n                             [91.198.224.70 listed in list.dnswl.org]\n -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record\n -0.0 SPF_PASS               SPF: sender matches SPF record\n  0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n not necessarily valid\n -0.1 DKIM_VALID_AU          Message has a valid DKIM or DK signature from\n author's\n                             domain\n -0.1 DKIM_VALID_EF          Message has a valid DKIM or DK signature from\n                             envelope-from domain\n -0.1 DKIM_VALID             Message has at least one valid DKIM or DK\n signature\n -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n                             [score: 0.0000]",
        "X-BeenThere": "openwrt-devel@lists.openwrt.org",
        "X-Mailman-Version": "2.1.34",
        "Precedence": "list",
        "List-Id": "OpenWrt Development List <openwrt-devel.lists.openwrt.org>",
        "List-Unsubscribe": "<https://lists.openwrt.org/mailman/options/openwrt-devel>,\n <mailto:openwrt-devel-request@lists.openwrt.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.openwrt.org/pipermail/openwrt-devel/>",
        "List-Post": "<mailto:openwrt-devel@lists.openwrt.org>",
        "List-Help": "<mailto:openwrt-devel-request@lists.openwrt.org?subject=help>",
        "List-Subscribe": "<https://lists.openwrt.org/mailman/listinfo/openwrt-devel>,\n <mailto:openwrt-devel-request@lists.openwrt.org?subject=subscribe>",
        "Content-Type": "multipart/mixed; boundary=\"===============5542847844140707183==\"",
        "Sender": "\"openwrt-devel\" <openwrt-devel-bounces@lists.openwrt.org>",
        "Errors-To": "\n openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org"
    },
    "content": "This commit writes connected device's information (oui and vendor) to\nieee-oui.txt for arp-scan if export is set to true.\nThis way there is no unneccessary big file on the target.\n\nCHANGE to v1: corrected the patch for upstream and included an option\n`export` to choose if it is activated.\n\nSigned-off-by: Christian Korber <ckorber@tdt.de>\n---\n ufpd | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++--\n 1 file changed, 52 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/ufpd b/ufpd\nindex c41ab8c..da988ac 100755\n--- a/ufpd\n+++ b/ufpd\n@@ -3,7 +3,7 @@\n import * as uloop from \"uloop\";\n import * as libubus from \"ubus\";\n import * as unetmsg from \"unetmsg.client\";\n-import { readfile, glob, basename } from \"fs\";\n+import { readfile, glob, basename, open, stat, mkdir } from \"fs\";\n let uht = require(\"uht\");\n push(REQUIRE_SEARCH_PATH, \"/usr/share/ufp/*.uc\");\n \n@@ -365,7 +365,8 @@ global.ubus_object = {\n \t\t\tmacaddr: \"\",\n \t\t\tubus_rpc_session: \"\",\n \t\t\tweight: false,\n-\t\t\tlocal: false\n+\t\t\tlocal: false,\n+\t\t\texport: false\n \t\t},\n \t\tcall: function(req) {\n \t\t\trefresh_plugins();\n@@ -373,6 +374,7 @@ global.ubus_object = {\n \t\t\tlet cur_devices = network_devices(req.args.local);\n \t\t\tlet mac_list = req.args.macaddr ? [ req.args.macaddr ] : keys(cur_devices);\n \t\t\tlet ret = {};\n+\t\t\tlet to_file = req.args.export;\n \n \t\t\tfor (let mac in mac_list) {\n \t\t\t\tlet match_list = device_match_list(mac, cur_devices);\n@@ -398,6 +400,54 @@ global.ubus_object = {\n \t\t\t\t}\n \t\t\t}\n \n+\t\t\t/*\n+\t\t\t * We want to populate ieee-oui.txt in order to\n+\t\t\t * use it for arp-scan. This way we don't need a\n+\t\t\t * large file too big in size, but rather rely on\n+\t\t\t * found data via ubus call 'fingerprint'.\n+\t\t\t * ieee-oui.txt will be updated on every call to:\n+\t\t\t * `ubus call fingerprint fingerprint`.\n+\t\t\t */\n+\n+\t\t\tif(to_file) {\n+\t\t\t\tconst tmp_dir = '/tmp/arp-scan';\n+\t\t\t\tconst ieee_file = sprintf('%s/ieee-oui.txt', tmp_dir);\n+\t\t\t\tlet ouis_added = [];\n+\n+\t\t\t\tif (!stat(tmp_dir))\n+\t\t\t\t\tmkdir(tmp_dir);\n+\n+\t\t\t\tconst fd = open(ieee_file, 'a+');\n+\n+\t\t\t\t/*\n+\t\t\t\t* check for duplicate ouis\n+\t\t\t\t*/\n+\t\t\t\tfor (let line = fd.read('line'); length(line); line = fd.read('line')) {\n+\t\t\t\t\tlet oui = split(line, '\\t')[0];\n+\t\t\t\t\toui = uc(oui);\n+\n+\t\t\t\t\tif (index(ouis_added, oui) < 0)\n+\t\t\t\t\t\tpush(ouis_added, oui);\n+\t\t\t\t}\n+\n+\t\t\t\t/*\n+\t\t\t\t* write to ieee-oui.txt\n+\t\t\t\t*/\n+\t\t\t\tfor (let entry in ret) {\n+\t\t\t\t\tlet vendor = ret[entry].vendor;\n+\t\t\t\t\tlet oui = split(entry, ':');\n+\t\t\t\t\toui = join('', slice(oui, 0,3));\n+\t\t\t\t\toui = uc(oui);\n+\n+\t\t\t\t\tif (index(ouis_added, oui) < 0) {\n+\t\t\t\t\t\tlet line = sprintf('%s\\t%s\\n', oui, vendor);\n+\t\t\t\t\t\tfd.write(line);\n+\t\t\t\t\t}\n+\t\t\t\t}\n+\n+\t\t\t\tfd.close();\n+\t\t\t}\n+\n \t\t\treturn req.args.macaddr ? ret[req.args.macaddr] : ret;\n \t\t}\n \t},\n",
    "prefixes": [
        "ufp",
        "v2"
    ]
}