get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 806707,
    "url": "http://patchwork.ozlabs.org/api/patches/806707/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/1503944442-8994-1-git-send-email-amsalam20@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": "<1503944442-8994-1-git-send-email-amsalam20@gmail.com>",
    "list_archive_url": null,
    "date": "2017-08-28T18:20:42",
    "name": "ipv6: sr: fix get_srh() to comply with IPv6 standard \"RFC 8200\"",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "2aa8c98460ee78fb7bc47926b3086d992a9103e5",
    "submitter": {
        "id": 72243,
        "url": "http://patchwork.ozlabs.org/api/people/72243/?format=api",
        "name": "Ahmed Abdelsalam",
        "email": "amsalam20@gmail.com"
    },
    "delegate": {
        "id": 34,
        "url": "http://patchwork.ozlabs.org/api/users/34/?format=api",
        "username": "davem",
        "first_name": "David",
        "last_name": "Miller",
        "email": "davem@davemloft.net"
    },
    "mbox": "http://patchwork.ozlabs.org/project/netdev/patch/1503944442-8994-1-git-send-email-amsalam20@gmail.com/mbox/",
    "series": [
        {
            "id": 232,
            "url": "http://patchwork.ozlabs.org/api/series/232/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=232",
            "date": "2017-08-28T18:20:42",
            "name": "ipv6: sr: fix get_srh() to comply with IPv6 standard \"RFC 8200\"",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/232/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/806707/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/806707/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<netdev-owner@vger.kernel.org>",
        "X-Original-To": "patchwork-incoming@ozlabs.org",
        "Delivered-To": "patchwork-incoming@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=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"ki3+B87E\"; dkim-atps=neutral"
        ],
        "Received": [
            "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xh0Sn23gwz9sN7\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue, 29 Aug 2017 04:20:57 +1000 (AEST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751927AbdH1SUz (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tMon, 28 Aug 2017 14:20:55 -0400",
            "from mail-wr0-f196.google.com ([209.85.128.196]:38301 \"EHLO\n\tmail-wr0-f196.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751918AbdH1SUw (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Mon, 28 Aug 2017 14:20:52 -0400",
            "by mail-wr0-f196.google.com with SMTP id j3so840671wrb.5\n\tfor <netdev@vger.kernel.org>; Mon, 28 Aug 2017 11:20:51 -0700 (PDT)",
            "from kernel-dev.cisco.com ([173.38.220.37])\n\tby smtp.gmail.com with ESMTPSA id\n\ti22sm1357577wrf.18.2017.08.28.11.20.50\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tMon, 28 Aug 2017 11:20:50 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id;\n\tbh=TqJu4rPx5fPWhLZDXSiX8c9yxKaUpZOuExPquKgh1G0=;\n\tb=ki3+B87E3B5uN9uzS5qN/LHq3jv+v4Sxv6x2/fT0wHFar3kSo88PsnoNAqDO2wc1SR\n\tS92oWc8ZDCPk+pNZFF2t/blun7V8OF2onK2xmVab9gXgiqOCLyzzeE9vvkaU0rLfKvin\n\t5yZscpgB1H137TiGXsgmSgg80mp6whBz/sIWoLUzRVhFut4mDT+fPoa3SVf+AW0wdkO8\n\tAHnEzSgRjGUaauOt3TMcI/SaniB08MrcEUOz0VDZKKc/ABy3dwMwNkQILJCl4sqWY/6F\n\tSWjQJaELLRVb2ovgjaqRkHaAwGJDzPLg/VU+ZK/p+oZExGfzjdvOMSu1aPMCzjaQOULD\n\tySRQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id;\n\tbh=TqJu4rPx5fPWhLZDXSiX8c9yxKaUpZOuExPquKgh1G0=;\n\tb=CjHS2X9gW8M15anXLoH1kl3YW/0hEWskb2rO5OlHUFlEwSySYwQy4TQdFU1xkAHXQ/\n\tHR1kSdOENl/kLcqWRSJtvmbhgoXbvN4LIxj6yIdRdUTDJw/DxbEoZZOr/YK4SqvguEr/\n\tjp38alf1a3GhpvdS5zKkLRfvzeZxgNXlWbZhTG+NJ2wxRAJlyeT/a0DxefMAeltDj1mp\n\tIySl9uKZUFlpSZ3cMEpI9Fm+udMMdldwz0l2DQ3DH2CEy06WOlsFnOW91qe/n/GKDVAO\n\tm7JButJW1/dHKaBuv4+WDj2+rZLEIibdRSNnjKgLKm+Tt+Bl1OHjEgw+Hyt3wOsatwv7\n\tbEZA==",
        "X-Gm-Message-State": "AHYfb5g/WVwckCZIys+9yW9N9jCWKq/WPZEOivrIU2V9fYmL7gykDR+w\n\t7tWYEKNqMD782w==",
        "X-Received": "by 10.223.129.228 with SMTP id 91mr1029809wra.334.1503944451122; \n\tMon, 28 Aug 2017 11:20:51 -0700 (PDT)",
        "From": "Ahmed Abdelsalam <amsalam20@gmail.com>",
        "To": "davem@davemloft.net",
        "Cc": "yoshfuji@linux-ipv6.org, netdev@vger.kernel.org, amsalam20@gmail.com",
        "Subject": "[PATCH] ipv6: sr: fix get_srh() to comply with IPv6 standard \"RFC\n\t8200\"",
        "Date": "Mon, 28 Aug 2017 20:20:42 +0200",
        "Message-Id": "<1503944442-8994-1-git-send-email-amsalam20@gmail.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "Sender": "netdev-owner@vger.kernel.org",
        "Precedence": "bulk",
        "List-ID": "<netdev.vger.kernel.org>",
        "X-Mailing-List": "netdev@vger.kernel.org"
    },
    "content": "IPv6 packet may carry more than one extension header, and IPv6 nodes must\nacceptand attempt to process extension headers in any order and occurring\nany number of times in the same packet. Hence, there should be no\nassumption that Segment Routing extension header is to appear immediately\nafter the IPv6 header.\n\nMoreover, section 4.1 of RFC 8200 gives a recommendation on the order of\nappearance of those extension headers within an IPv6 packet. According to\nthis recommendation, Segment Routing extension header should appear after\nHop-by-Hop and Destination Options headers (if they present).\n\nThis patch fixes the get_srh(), so it gets the segment routing header\nregardless of its position in the chain of the extension headers in IPv6\npacket, and makes sure that the IPv6 routing extension header is of\nType 4.\n\nSigned-off-by: Ahmed Abdelsalam <amsalam20@gmail.com>\n---\n net/ipv6/seg6_local.c | 16 +++++++++-------\n 1 file changed, 9 insertions(+), 7 deletions(-)",
    "diff": "diff --git a/net/ipv6/seg6_local.c b/net/ipv6/seg6_local.c\nindex 9c1a885..ae97fd9 100644\n--- a/net/ipv6/seg6_local.c\n+++ b/net/ipv6/seg6_local.c\n@@ -62,17 +62,19 @@ static struct seg6_local_lwt *seg6_local_lwtunnel(struct lwtunnel_state *lwt)\n static struct ipv6_sr_hdr *get_srh(struct sk_buff *skb)\n {\n \tstruct ipv6_sr_hdr *srh;\n-\tstruct ipv6hdr *hdr;\n-\tint len;\n+\tint len, srhoff;\n \n-\thdr = ipv6_hdr(skb);\n-\tif (hdr->nexthdr != IPPROTO_ROUTING)\n+\tif (ipv6_find_hdr(skb, &srhoff, IPPROTO_ROUTING, NULL, NULL) < 0)\n \t\treturn NULL;\n \n-\tsrh = (struct ipv6_sr_hdr *)(hdr + 1);\n-\tlen = (srh->hdrlen + 1) << 3;\n+\tsrh = (struct ipv6_sr_hdr *)(skb->data + srhoff);\n \n-\tif (!pskb_may_pull(skb, sizeof(*hdr) + len))\n+\t/* make sure it's a Segment Routing header (Routing Type 4) */\n+\tif (srh->type != IPV6_SRCRT_TYPE_4)\n+\t\treturn NULL;\n+\n+\tlen = (srh->hdrlen + 1) << 3;\n+\tif (!pskb_may_pull(skb, srhoff + len))\n \t\treturn NULL;\n \n \tif (!seg6_validate_srh(srh, len))\n",
    "prefixes": []
}