Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1168602/?format=api
{ "id": 1168602, "url": "http://patchwork.ozlabs.org/api/patches/1168602/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/481a7b9f2e18112c61f60aecb735e8438840ff62.1569491461.git.sd@queasysnail.net/", "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": "<481a7b9f2e18112c61f60aecb735e8438840ff62.1569491461.git.sd@queasysnail.net>", "list_archive_url": null, "date": "2019-09-27T14:58:58", "name": "[ipsec-next,v3,3/6] xfrm: add route lookup to xfrm4_rcv_encap", "commit_ref": null, "pull_url": null, "state": "awaiting-upstream", "archived": false, "hash": "adc4aa5c8152e7c55a9b15bee6c7ceefc00cdfb4", "submitter": { "id": 47767, "url": "http://patchwork.ozlabs.org/api/people/47767/?format=api", "name": "Sabrina Dubroca", "email": "sd@queasysnail.net" }, "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/481a7b9f2e18112c61f60aecb735e8438840ff62.1569491461.git.sd@queasysnail.net/mbox/", "series": [ { "id": 132948, "url": "http://patchwork.ozlabs.org/api/series/132948/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=132948", "date": "2019-09-27T14:58:55", "name": "ipsec: add TCP encapsulation support (RFC 8229)", "version": 3, "mbox": "http://patchwork.ozlabs.org/series/132948/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1168602/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1168602/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<netdev-owner@vger.kernel.org>", "X-Original-To": "patchwork-incoming-netdev@ozlabs.org", "Delivered-To": "patchwork-incoming-netdev@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; dmarc=none (p=none dis=none)\n\theader.from=queasysnail.net" ], "Received": [ "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 46fw0c2rd3z9sNf\n\tfor <patchwork-incoming-netdev@ozlabs.org>;\n\tSat, 28 Sep 2019 00:58:40 +1000 (AEST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1727822AbfI0O6j (ORCPT\n\t<rfc822;patchwork-incoming-netdev@ozlabs.org>);\n\tFri, 27 Sep 2019 10:58:39 -0400", "from mx1.redhat.com ([209.132.183.28]:34566 \"EHLO mx1.redhat.com\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S1726843AbfI0O6g (ORCPT <rfc822;netdev@vger.kernel.org>);\n\tFri, 27 Sep 2019 10:58:36 -0400", "from smtp.corp.redhat.com\n\t(int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id B1E5D18CB906;\n\tFri, 27 Sep 2019 14:58:36 +0000 (UTC)", "from hog.localdomain, (unknown [10.40.206.20])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 986308DC00;\n\tFri, 27 Sep 2019 14:58:35 +0000 (UTC)" ], "From": "Sabrina Dubroca <sd@queasysnail.net>", "To": "netdev@vger.kernel.org", "Cc": "Herbert Xu <herbert@gondor.apana.org.au>,\n\tSteffen Klassert <steffen.klassert@secunet.com>,\n\tSabrina Dubroca <sd@queasysnail.net>", "Subject": "[PATCH ipsec-next v3 3/6] xfrm: add route lookup to xfrm4_rcv_encap", "Date": "Fri, 27 Sep 2019 16:58:58 +0200", "Message-Id": "<481a7b9f2e18112c61f60aecb735e8438840ff62.1569491461.git.sd@queasysnail.net>", "In-Reply-To": "<cover.1569491461.git.sd@queasysnail.net>", "References": "<cover.1569491461.git.sd@queasysnail.net>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.13", "X-Greylist": "Sender IP whitelisted, not delayed by milter-greylist-4.6.2\n\t(mx1.redhat.com [10.5.110.63]);\n\tFri, 27 Sep 2019 14:58:36 +0000 (UTC)", "Sender": "netdev-owner@vger.kernel.org", "Precedence": "bulk", "List-ID": "<netdev.vger.kernel.org>", "X-Mailing-List": "netdev@vger.kernel.org" }, "content": "At this point, with TCP encapsulation, the dst may be gone, but\nxfrm_input needs one.\n\nSigned-off-by: Sabrina Dubroca <sd@queasysnail.net>\n---\n net/ipv4/xfrm4_protocol.c | 9 +++++++++\n 1 file changed, 9 insertions(+)", "diff": "diff --git a/net/ipv4/xfrm4_protocol.c b/net/ipv4/xfrm4_protocol.c\nindex 8a4285712808..ea595c8549c7 100644\n--- a/net/ipv4/xfrm4_protocol.c\n+++ b/net/ipv4/xfrm4_protocol.c\n@@ -72,6 +72,14 @@ int xfrm4_rcv_encap(struct sk_buff *skb, int nexthdr, __be32 spi,\n \tif (!head)\n \t\tgoto out;\n \n+\tif (!skb_dst(skb)) {\n+\t\tconst struct iphdr *iph = ip_hdr(skb);\n+\n+\t\tif (ip_route_input_noref(skb, iph->daddr, iph->saddr,\n+\t\t\t\t\t iph->tos, skb->dev))\n+\t\t\tgoto drop;\n+\t}\n+\n \tfor_each_protocol_rcu(*head, handler)\n \t\tif ((ret = handler->input_handler(skb, nexthdr, spi, encap_type)) != -EINVAL)\n \t\t\treturn ret;\n@@ -79,6 +87,7 @@ int xfrm4_rcv_encap(struct sk_buff *skb, int nexthdr, __be32 spi,\n out:\n \ticmp_send(skb, ICMP_DEST_UNREACH, ICMP_PORT_UNREACH, 0);\n \n+drop:\n \tkfree_skb(skb);\n \treturn 0;\n }\n", "prefixes": [ "ipsec-next", "v3", "3/6" ] }