get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 811579,
    "url": "http://patchwork.ozlabs.org/api/1.2/patches/811579/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netfilter-devel/patch/1504876148-28786-1-git-send-email-pablo@netfilter.org/",
    "project": {
        "id": 26,
        "url": "http://patchwork.ozlabs.org/api/1.2/projects/26/?format=api",
        "name": "Netfilter Development",
        "link_name": "netfilter-devel",
        "list_id": "netfilter-devel.vger.kernel.org",
        "list_email": "netfilter-devel@vger.kernel.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<1504876148-28786-1-git-send-email-pablo@netfilter.org>",
    "list_archive_url": null,
    "date": "2017-09-08T13:09:08",
    "name": "[nft] mnl: do not set NLM_F_CREATE in deletion requests",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "c543a73364197d45ff89e6175c080ce0ec048fcd",
    "submitter": {
        "id": 1315,
        "url": "http://patchwork.ozlabs.org/api/1.2/people/1315/?format=api",
        "name": "Pablo Neira Ayuso",
        "email": "pablo@netfilter.org"
    },
    "delegate": {
        "id": 6139,
        "url": "http://patchwork.ozlabs.org/api/1.2/users/6139/?format=api",
        "username": "pablo",
        "first_name": "Pablo",
        "last_name": "Neira",
        "email": "pablo@netfilter.org"
    },
    "mbox": "http://patchwork.ozlabs.org/project/netfilter-devel/patch/1504876148-28786-1-git-send-email-pablo@netfilter.org/mbox/",
    "series": [
        {
            "id": 2203,
            "url": "http://patchwork.ozlabs.org/api/1.2/series/2203/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/netfilter-devel/list/?series=2203",
            "date": "2017-09-08T13:09:08",
            "name": "[nft] mnl: do not set NLM_F_CREATE in deletion requests",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/2203/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/811579/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/811579/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<netfilter-devel-owner@vger.kernel.org>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org",
        "Authentication-Results": "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netfilter-devel-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)",
        "Received": [
            "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xpd256gmdz9ryk\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  8 Sep 2017 23:09:17 +1000 (AEST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1755517AbdIHNJR (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n\tFri, 8 Sep 2017 09:09:17 -0400",
            "from mail.us.es ([193.147.175.20]:41992 \"EHLO mail.us.es\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S1755392AbdIHNJQ (ORCPT <rfc822; netfilter-devel@vger.kernel.org>);\n\tFri, 8 Sep 2017 09:09:16 -0400",
            "from antivirus1-rhel7.int (unknown [192.168.2.11])\n\tby mail.us.es (Postfix) with ESMTP id 3578953AA2A\n\tfor <netfilter-devel@vger.kernel.org>;\n\tFri,  8 Sep 2017 15:08:45 +0200 (CEST)",
            "from antivirus1-rhel7.int (localhost [127.0.0.1])\n\tby antivirus1-rhel7.int (Postfix) with ESMTP id 27ECAB5028\n\tfor <netfilter-devel@vger.kernel.org>;\n\tFri,  8 Sep 2017 15:08:45 +0200 (CEST)",
            "by antivirus1-rhel7.int (Postfix, from userid 99)\n\tid 1D8D3B5027; Fri,  8 Sep 2017 15:08:45 +0200 (CEST)",
            "from antivirus1-rhel7.int (localhost [127.0.0.1])\n\tby antivirus1-rhel7.int (Postfix) with ESMTP id 2389FB5028\n\tfor <netfilter-devel@vger.kernel.org>;\n\tFri,  8 Sep 2017 15:08:43 +0200 (CEST)",
            "from 192.168.1.97 (192.168.1.97) by antivirus1-rhel7.int\n\t(F-Secure/fsigk_smtp/550/antivirus1-rhel7.int); \n\tFri, 08 Sep 2017 15:08:43 +0200 (CEST)",
            "from salvia.here (129.166.216.87.static.jazztel.es\n\t[87.216.166.129]) (Authenticated sender: pneira@us.es)\n\tby entrada.int (Postfix) with ESMTPA id EA2EE42EFA9C\n\tfor <netfilter-devel@vger.kernel.org>;\n\tFri,  8 Sep 2017 15:08:42 +0200 (CEST)"
        ],
        "X-Spam-Checker-Version": "SpamAssassin 3.4.1 (2015-04-28) on\n\tantivirus1-rhel7.int",
        "X-Spam-Level": "",
        "X-Spam-Status": "No, score=-108.2 required=7.5 tests=ALL_TRUSTED,BAYES_50,\n\tSMTPAUTH_US2,USER_IN_WHITELIST autolearn=disabled version=3.4.1",
        "X-Virus-Status": "clean(F-Secure/fsigk_smtp/550/antivirus1-rhel7.int)",
        "X-SMTPAUTHUS": "auth mail.us.es",
        "From": "Pablo Neira Ayuso <pablo@netfilter.org>",
        "To": "netfilter-devel@vger.kernel.org",
        "Subject": "[PATCH nft] mnl: do not set NLM_F_CREATE in deletion requests",
        "Date": "Fri,  8 Sep 2017 15:09:08 +0200",
        "Message-Id": "<1504876148-28786-1-git-send-email-pablo@netfilter.org>",
        "X-Mailer": "git-send-email 2.1.4",
        "X-Virus-Scanned": "ClamAV using ClamSMTP",
        "Sender": "netfilter-devel-owner@vger.kernel.org",
        "Precedence": "bulk",
        "List-ID": "<netfilter-devel.vger.kernel.org>",
        "X-Mailing-List": "netfilter-devel@vger.kernel.org"
    },
    "content": "This flag is not legal there, it only makes sense for addition requests.\nThis patch has no impact at all in any of the nf_tables kernel versions.\n\nSigned-off-by: Pablo Neira Ayuso <pablo@netfilter.org>\n---\n src/mnl.c | 7 +++++--\n 1 file changed, 5 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/src/mnl.c b/src/mnl.c\nindex 69e24071b8f1..e2174925c121 100644\n--- a/src/mnl.c\n+++ b/src/mnl.c\n@@ -947,10 +947,13 @@ static int mnl_nft_setelem_batch(struct nftnl_set *nls,\n \tif (iter == NULL)\n \t\tmemory_allocation_error();\n \n+\tif (cmd == NFT_MSG_NEWSETELEM)\n+\t\tflags |= NLM_F_CREATE;\n+\n \twhile (nftnl_set_elems_iter_cur(iter)) {\n \t\tnlh = nftnl_nlmsg_build_hdr(nftnl_batch_buffer(batch), cmd,\n \t\t\t\t\t    nftnl_set_get_u32(nls, NFTNL_SET_FAMILY),\n-\t\t\t\t\t    NLM_F_CREATE | flags, seqnum);\n+\t\t\t\t\t    flags, seqnum);\n \t\tret = nftnl_set_elems_nlmsg_build_payload_iter(nlh, iter);\n \t\tmnl_nft_batch_continue(batch);\n \t\tif (ret <= 0)\n@@ -977,7 +980,7 @@ int mnl_nft_setelem_batch_flush(struct nftnl_set *nls, struct nftnl_batch *batch\n \tnlh = nftnl_nlmsg_build_hdr(nftnl_batch_buffer(batch),\n \t\t\t\t    NFT_MSG_DELSETELEM,\n \t\t\t\t    nftnl_set_get_u32(nls, NFTNL_SET_FAMILY),\n-\t\t\t\t    NLM_F_CREATE | flags, seqnum);\n+\t\t\t\t    flags, seqnum);\n \tnftnl_set_elems_nlmsg_build_payload(nlh, nls);\n \tmnl_nft_batch_continue(batch);\n \n",
    "prefixes": [
        "nft"
    ]
}