get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2196431,
    "url": "http://patchwork.ozlabs.org/api/patches/2196431/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260213-fix-hostfwd-unix-dash-v1-1-9e26fc2b63d6@pm.me/",
    "project": {
        "id": 14,
        "url": "http://patchwork.ozlabs.org/api/projects/14/?format=api",
        "name": "QEMU Development",
        "link_name": "qemu-devel",
        "list_id": "qemu-devel.nongnu.org",
        "list_email": "qemu-devel@nongnu.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260213-fix-hostfwd-unix-dash-v1-1-9e26fc2b63d6@pm.me>",
    "list_archive_url": null,
    "date": "2026-02-13T21:57:47",
    "name": "net/slirp: allow hostfwd socket paths with dashes",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "65516e3562fad80c86b593d03662bd2966d8b96b",
    "submitter": {
        "id": 92639,
        "url": "http://patchwork.ozlabs.org/api/people/92639/?format=api",
        "name": "Christopher Palmer-Richez",
        "email": "crichez@pm.me"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260213-fix-hostfwd-unix-dash-v1-1-9e26fc2b63d6@pm.me/mbox/",
    "series": [
        {
            "id": 492139,
            "url": "http://patchwork.ozlabs.org/api/series/492139/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=492139",
            "date": "2026-02-13T21:57:47",
            "name": "net/slirp: allow hostfwd socket paths with dashes",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/492139/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2196431/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2196431/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.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=pm.me header.i=@pm.me header.a=rsa-sha256\n header.s=protonmail3 header.b=K7yuXvRG;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)"
        ],
        "Received": [
            "from lists.gnu.org (lists.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fCQz71LVBz1xpl\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 14 Feb 2026 08:58:27 +1100 (AEDT)",
            "from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1vr1Aw-0000oB-Km; Fri, 13 Feb 2026 16:58:10 -0500",
            "from eggs.gnu.org ([2001:470:142:3::10])\n by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <crichez@pm.me>) id 1vr1At-0000nn-Ce\n for qemu-devel@nongnu.org; Fri, 13 Feb 2026 16:58:07 -0500",
            "from mail-05.mail-europe.com ([85.9.206.169])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <crichez@pm.me>) id 1vr1Ar-0001JK-2a\n for qemu-devel@nongnu.org; Fri, 13 Feb 2026 16:58:07 -0500"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me;\n s=protonmail3; t=1771019872; x=1771279072;\n bh=46PDkYIs1PJ0gevHFfEmkZMBRlQ4IZCSlCTfA41mf7k=;\n h=Date:To:From:Cc:Subject:Message-ID:Feedback-ID:From:To:Cc:Date:\n Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector;\n b=K7yuXvRGZEPYemeEMQuIAOF9Gr5pY8/Gaim2D6PrnCtVmT3yc4HXv3VYbg+f9We2j\n OoSst1eZVbGnleS/m+bZ9kSscj8U8tFgTmycbP71x5mfHmeCebHb55a92e4QA+a7pb\n ySIfzYliP2e8SsIdDXpBtN+plDVaCQfL5ONUdUShZK8vYTJZq9/G/i1HZQUUxCWHGN\n M9QSLTc/5ae70jbc7J53XZ87Z8x3iSs+winQCPCARByHE5IffEkMQzpKdD9A/Y+fhJ\n cbkjHAvKY77Kncqp2MrZImH4CM+y3cPRKCJ/UjrAAgv0aSOY2Ug5Wj0JTN900qXJOC\n aZTNn7/WMwRpw==",
        "Date": "Fri, 13 Feb 2026 21:57:47 +0000",
        "To": "qemu-devel@nongnu.org, qemu-trivial@nongnu.org",
        "From": "Christopher Palmer-Richez <crichez@pm.me>",
        "Cc": "Samuel Thibault <samuel.thibault@ens-lyon.org>,\n Jason Wang <jasowang@redhat.com>, Christopher Palmer-Richez <crichez@pm.me>",
        "Subject": "[PATCH] net/slirp: allow hostfwd socket paths with dashes",
        "Message-ID": "<20260213-fix-hostfwd-unix-dash-v1-1-9e26fc2b63d6@pm.me>",
        "Feedback-ID": "5960063:user:proton",
        "X-Pm-Message-ID": "eede0d838983f5b687a7d53726dd6a73156f882e",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=utf-8",
        "Content-Transfer-Encoding": "quoted-printable",
        "Received-SPF": "pass client-ip=85.9.206.169; envelope-from=crichez@pm.me;\n helo=mail-05.mail-europe.com",
        "X-Spam_score_int": "-27",
        "X-Spam_score": "-2.8",
        "X-Spam_bar": "--",
        "X-Spam_report": "(-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,\n DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001,\n RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001,\n SPF_PASS=-0.001 autolearn=ham autolearn_force=no",
        "X-Spam_action": "no action",
        "X-BeenThere": "qemu-devel@nongnu.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "qemu development <qemu-devel.nongnu.org>",
        "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>",
        "List-Archive": "<https://lists.nongnu.org/archive/html/qemu-devel>",
        "List-Post": "<mailto:qemu-devel@nongnu.org>",
        "List-Help": "<mailto:qemu-devel-request@nongnu.org?subject=help>",
        "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>",
        "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org",
        "Sender": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org"
    },
    "content": "Adds get_last_str_sep, a variant of get_str_sep that checks for the last\noccurence of a separator. Updates slirp_hostfwd to parse unix domain\nsocket paths with dashes.\n\nResolves: https://gitlab.com/qemu-project/qemu/-/issues/347\nSigned-off-by: Christopher Palmer-Richez <crichez@pm.me>\n---\nQEMU added support for `-netdev user,hostfwd=unix:/tmp/vm-:22` last year.\nThe implementation detects the first dash, and interprets the right side\nof it as the guest address (or lack thereof). If the host socket path\ncontains a dash, the invocation fails with \"Bad guest address.\"\n\nThis tiny patch adds a variant of the `get_str_sep` method previously\nused by `slirp_hostfwd`, but that detects the last occurence of a\nseparator instead: `get_last_str_sep`. The only difference is the use of\n`strrchr` instead of `strchr`. `slirp_hostfwd` now uses it. It ignores\ndashes up to the last occurence, which allows unix domain socket paths\nwith dashes.\n---\n net/slirp.c | 22 +++++++++++++++++++++-\n 1 file changed, 21 insertions(+), 1 deletion(-)\n\n\n---\nbase-commit: ece408818d27f745ef1b05fb3cc99a1e7a5bf580\nchange-id: 20260213-fix-hostfwd-unix-dash-b3fe7b49a362\n\nBest regards,",
    "diff": "diff --git a/net/slirp.c b/net/slirp.c\nindex 04925f3318..968be9cc99 100644\n--- a/net/slirp.c\n+++ b/net/slirp.c\n@@ -69,6 +69,26 @@ static int get_str_sep(char *buf, int buf_size, const char **pp, int sep)\n     return 0;\n }\n \n+static int get_last_str_sep(char *buf, int buf_size, const char **pp, int sep)\n+{\n+    const char *p, *p1;\n+    int len;\n+    p = *pp;\n+    p1 = strrchr(p, sep);\n+    if (!p1)\n+        return -1;\n+    len = p1 - p;\n+    p1++;\n+    if (buf_size > 0) {\n+        if (len > buf_size - 1)\n+            len = buf_size - 1;\n+        memcpy(buf, p, len);\n+        buf[len] = '\\0';\n+    }\n+    *pp = p1;\n+    return 0;\n+}\n+\n /* slirp network adapter */\n \n #define SLIRP_CFG_HOSTFWD 1\n@@ -848,7 +868,7 @@ static int slirp_hostfwd(SlirpState *s, const char *redir_str, Error **errp)\n \n #if !defined(WIN32) && SLIRP_CHECK_VERSION(4, 7, 0)\n     if (is_unix) {\n-        if (get_str_sep(buf, sizeof(buf), &p, '-') < 0) {\n+        if (get_last_str_sep(buf, sizeof(buf), &p, '-') < 0) {\n             fail_reason = \"Missing - separator\";\n             goto fail_syntax;\n         }\n",
    "prefixes": []
}