get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 538,
    "url": "http://patchwork.ozlabs.org/api/patches/538/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/a60ec8830809181000s928a4drbd0b166be23abcee@mail.gmail.com/",
    "project": {
        "id": 7,
        "url": "http://patchwork.ozlabs.org/api/projects/7/?format=api",
        "name": "Linux network development",
        "link_name": "netdev",
        "list_id": "netdev.vger.kernel.org",
        "list_email": "netdev@vger.kernel.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<a60ec8830809181000s928a4drbd0b166be23abcee@mail.gmail.com>",
    "list_archive_url": null,
    "date": "2008-09-18T17:00:39",
    "name": "iputils: ping.c - using -I for both interface and address",
    "commit_ref": null,
    "pull_url": null,
    "state": "not-applicable",
    "archived": true,
    "hash": "b3b4dcb339eb816bf603d99beec6908ca93a0c91",
    "submitter": {
        "id": 268,
        "url": "http://patchwork.ozlabs.org/api/people/268/?format=api",
        "name": "Nadav Shemer",
        "email": "nadav.shemer@gmail.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/netdev/patch/a60ec8830809181000s928a4drbd0b166be23abcee@mail.gmail.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/538/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/538/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<netdev-owner@vger.kernel.org>",
        "X-Original-To": "patchwork-incoming@ozlabs.org",
        "Delivered-To": "patchwork-incoming@ozlabs.org",
        "Received": [
            "from vger.kernel.org (vger.kernel.org [209.132.176.167])\n\tby ozlabs.org (Postfix) with ESMTP id 2D8F9DE10A\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri, 19 Sep 2008 03:00:47 +1000 (EST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1754325AbYIRRAm (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tThu, 18 Sep 2008 13:00:42 -0400",
            "(majordomo@vger.kernel.org) by vger.kernel.org id S1754110AbYIRRAl\n\t(ORCPT <rfc822; netdev-outgoing>); Thu, 18 Sep 2008 13:00:41 -0400",
            "from mail-gx0-f16.google.com ([209.85.217.16]:49809 \"EHLO\n\tmail-gx0-f16.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1753833AbYIRRAl (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Thu, 18 Sep 2008 13:00:41 -0400",
            "by gxk9 with SMTP id 9so31509012gxk.13\n\tfor <netdev@vger.kernel.org>; Thu, 18 Sep 2008 10:00:40 -0700 (PDT)",
            "by 10.142.214.11 with SMTP id m11mr1508618wfg.69.1221757239745;\n\tThu, 18 Sep 2008 10:00:39 -0700 (PDT)",
            "by 10.142.14.2 with HTTP; Thu, 18 Sep 2008 10:00:39 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\n\th=domainkey-signature:received:received:message-id:date:from:reply-to\n\t:to:subject:mime-version:content-type:content-transfer-encoding\n\t:content-disposition;\n\tbh=IdNHK2hJMav9L7J3P2exFe3aIn0+/9t1lTBxr1paDjI=;\n\tb=jAH1evxYldvYh/4B+7l+EkI8XaF7V1jGgCOSzj+bZxsYhTpcxERzgpzSLZXLUQj7mf\n\tuClVVhpiL6fUo921R8/oL4tp1MP/5/9yoQE32hAgAw7VHrf2yaIAo1CVNidQJEb1XshC\n\tZdoF/ypSkZHUeNYsYMP0ifTQLvqcpckiECVRQ=",
        "DomainKey-Signature": "a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;\n\th=message-id:date:from:reply-to:to:subject:mime-version:content-type\n\t:content-transfer-encoding:content-disposition;\n\tb=rl5SLDDJPV2KykmykcHeK/+DigJIKstqvSQlRaKpnzF0ZhKpMZJbrYKBOdNYS+OlBj\n\tUygwSon0a7IaZ9OCnx4gCobGRAt9KHjMBqlupKzznkfLLLPxXDQ1Ua7t8UCVMDEBZnK8\n\t35+NO8LKAJkuiCNVSRjDdCYUSRc7fGTfNa3Dk=",
        "Message-ID": "<a60ec8830809181000s928a4drbd0b166be23abcee@mail.gmail.com>",
        "Date": "Thu, 18 Sep 2008 20:00:39 +0300",
        "From": "\"Nadav Shemer\" <nadav.shemer@gmail.com>",
        "Reply-To": "nadav@camelot.myftp.org",
        "To": "netdev@vger.kernel.org",
        "Subject": "iputils: ping.c - using -I for both interface and address",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "7bit",
        "Content-Disposition": "inline",
        "Sender": "netdev-owner@vger.kernel.org",
        "Precedence": "bulk",
        "List-ID": "<netdev.vger.kernel.org>",
        "X-Mailing-List": "netdev@vger.kernel.org"
    },
    "content": "When I use 'ping 1.2.3.4 -I eth1 -I 2.3.4.5' the packets come out with\neth1's address anyway.\nIt seems to me that IP_PKTINFO is set for every packet, with\nipi_spec_dst set to 0. This overrides the inet->saddr set by bind.\n\nHere's a fix:",
    "diff": "--- ping.c\t2007-11-27 02:57:27.000000000 +0200\n+++ ping.c.patched\t2008-09-18 19:59:45.000000000 +0300\n@@ -350,6 +350,8 @@\n \t\t\tfprintf(stderr, \"ping: unknown iface %s\\n\", device);\n \t\t\texit(2);\n \t\t}\n+\t\tif (options & F_STRICTSOURCE)\n+\t\t\tcmsg.ipi.ipi_spec_dst.s_addr = source.sin_addr.s_addr;\n \t\tcmsg.ipi.ipi_ifindex = ifr.ifr_ifindex;\n \t\tcmsg_len = sizeof(cmsg);\n \t}\n",
    "prefixes": []
}