Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/808702/?format=api
{ "id": 808702, "url": "http://patchwork.ozlabs.org/api/patches/808702/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/20170901140809.13230-2-phil@nwl.cc/", "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": "<20170901140809.13230-2-phil@nwl.cc>", "list_archive_url": null, "date": "2017-09-01T14:08:08", "name": "[iproute,1/2] link_gre6: Fix for changing tclass/flowlabel", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "466941819b33d49a4ca4247a0a3eb8020ffee619", "submitter": { "id": 4285, "url": "http://patchwork.ozlabs.org/api/people/4285/?format=api", "name": "Phil Sutter", "email": "phil@nwl.cc" }, "delegate": { "id": 389, "url": "http://patchwork.ozlabs.org/api/users/389/?format=api", "username": "shemminger", "first_name": "stephen", "last_name": "hemminger", "email": "shemminger@vyatta.com" }, "mbox": "http://patchwork.ozlabs.org/project/netdev/patch/20170901140809.13230-2-phil@nwl.cc/mbox/", "series": [ { "id": 1037, "url": "http://patchwork.ozlabs.org/api/series/1037/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=1037", "date": "2017-09-01T14:08:09", "name": "Fix and enhance link_gre6", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/1037/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/808702/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/808702/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>)", "Received": [ "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xkLgn04rBz9s7F\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat, 2 Sep 2017 00:08:37 +1000 (AEST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1752165AbdIAOIf (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tFri, 1 Sep 2017 10:08:35 -0400", "from orbyte.nwl.cc ([151.80.46.58]:59753 \"EHLO mail.nwl.cc\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S1752031AbdIAOIe (ORCPT <rfc822;netdev@vger.kernel.org>);\n\tFri, 1 Sep 2017 10:08:34 -0400", "from mail.nwl.cc (orbyte.nwl.cc [127.0.0.1])\n\tby mail.nwl.cc (Postfix) with ESMTP id 77A3365A5E;\n\tFri, 1 Sep 2017 16:08:33 +0200 (CEST)", "from xsao (localhost [IPv6:::1])\n\tby mail.nwl.cc (Postfix) with ESMTP id 57913644CF;\n\tFri, 1 Sep 2017 16:08:33 +0200 (CEST)" ], "From": "Phil Sutter <phil@nwl.cc>", "To": "Stephen Hemminger <stephen@networkplumber.org>", "Cc": "netdev@vger.kernel.org", "Subject": "[iproute PATCH 1/2] link_gre6: Fix for changing tclass/flowlabel", "Date": "Fri, 1 Sep 2017 16:08:08 +0200", "Message-Id": "<20170901140809.13230-2-phil@nwl.cc>", "X-Mailer": "git-send-email 2.13.1", "In-Reply-To": "<20170901140809.13230-1-phil@nwl.cc>", "References": "<20170901140809.13230-1-phil@nwl.cc>", "X-Virus-Scanned": "ClamAV using ClamSMTP", "Sender": "netdev-owner@vger.kernel.org", "Precedence": "bulk", "List-ID": "<netdev.vger.kernel.org>", "X-Mailing-List": "netdev@vger.kernel.org" }, "content": "When trying to change tclass or flowlabel of a GREv6 tunnel which has\nthe respective value set already, the code accidentally bitwise OR'ed\nthe old and the new value, leading to unexpected results. Fix this by\nclearing the relevant bits of flowinfo variable prior to assigning the\nnew value.\n\nFixes: af89576d7a8c4 (\"iproute2: GRE over IPv6 tunnel support.\")\nSigned-off-by: Phil Sutter <phil@nwl.cc>\n---\n ip/link_gre6.c | 2 ++\n 1 file changed, 2 insertions(+)", "diff": "diff --git a/ip/link_gre6.c b/ip/link_gre6.c\nindex 4d3d4b54210b9..447ac5d78ab7b 100644\n--- a/ip/link_gre6.c\n+++ b/ip/link_gre6.c\n@@ -288,6 +288,7 @@ get_failed:\n \t\t\telse {\n \t\t\t\tif (get_u8(&uval, *argv, 16))\n \t\t\t\t\tinvarg(\"invalid TClass\", *argv);\n+\t\t\t\tflowinfo &= ~IP6_FLOWINFO_TCLASS;\n \t\t\t\tflowinfo |= htonl((__u32)uval << 20) & IP6_FLOWINFO_TCLASS;\n \t\t\t\tflags &= ~IP6_TNL_F_USE_ORIG_TCLASS;\n \t\t\t}\n@@ -303,6 +304,7 @@ get_failed:\n \t\t\t\t\tinvarg(\"invalid Flowlabel\", *argv);\n \t\t\t\tif (uval > 0xFFFFF)\n \t\t\t\t\tinvarg(\"invalid Flowlabel\", *argv);\n+\t\t\t\tflowinfo &= ~IP6_FLOWINFO_FLOWLABEL;\n \t\t\t\tflowinfo |= htonl(uval) & IP6_FLOWINFO_FLOWLABEL;\n \t\t\t\tflags &= ~IP6_TNL_F_USE_ORIG_FLOWLABEL;\n \t\t\t}\n", "prefixes": [ "iproute", "1/2" ] }