Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/808033/?format=api
{ "id": 808033, "url": "http://patchwork.ozlabs.org/api/1.2/patches/808033/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/d782f2bb-ade5-62ed-f20f-4854e68a2b93@mail.ru/", "project": { "id": 7, "url": "http://patchwork.ozlabs.org/api/1.2/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": "<d782f2bb-ade5-62ed-f20f-4854e68a2b93@mail.ru>", "list_archive_url": null, "date": "2017-08-31T05:28:01", "name": "net: dccp: Add handling of IPV6_PKTOPTIONS to dccp_v6_do_rcv()", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "10540216264836979748f192013aa49d76e362c0", "submitter": { "id": 72254, "url": "http://patchwork.ozlabs.org/api/1.2/people/72254/?format=api", "name": "Andrii Vladyka", "email": "tulup@mail.ru" }, "delegate": { "id": 34, "url": "http://patchwork.ozlabs.org/api/1.2/users/34/?format=api", "username": "davem", "first_name": "David", "last_name": "Miller", "email": "davem@davemloft.net" }, "mbox": "http://patchwork.ozlabs.org/project/netdev/patch/d782f2bb-ade5-62ed-f20f-4854e68a2b93@mail.ru/mbox/", "series": [ { "id": 749, "url": "http://patchwork.ozlabs.org/api/1.2/series/749/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=749", "date": "2017-08-31T05:28:01", "name": "net: dccp: Add handling of IPV6_PKTOPTIONS to dccp_v6_do_rcv()", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/749/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/808033/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/808033/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 (1024-bit key;\n\tunprotected) header.d=mail.ru header.i=@mail.ru header.b=\"MH75Hvd2\";\n\tdkim=pass (1024-bit key) header.d=mail.ru header.i=@mail.ru\n\theader.b=\"MH75Hvd2\"; dkim-atps=neutral" ], "Received": [ "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xjWBM2JJPz9s83\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 31 Aug 2017 15:28:43 +1000 (AEST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751382AbdHaF2d (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tThu, 31 Aug 2017 01:28:33 -0400", "from fallback10.m.smailru.net ([94.100.178.50]:34110 \"EHLO\n\tfallback.mail.ru\" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org\n\twith ESMTP id S1751333AbdHaF2c (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Thu, 31 Aug 2017 01:28:32 -0400", "from [10.161.64.43] (port=54670 helo=smtp35.i.mail.ru)\n\tby fallback10.m.smailru.net with esmtp (envelope-from\n\t<tulup@mail.ru>)\n\tid 1dnI1l-0008Lc-3X; Thu, 31 Aug 2017 08:28:29 +0300", "by smtp35.i.mail.ru with esmtpa (envelope-from <tulup@mail.ru>)\n\tid 1dnI1O-0001P3-2K; Thu, 31 Aug 2017 08:28:06 +0300" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mail.ru;\n\ts=mail2; \n\th=Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:Cc:References:To:Subject;\n\tbh=HYeCws3ZAKyC+7KQOZnjTUG4gdGqlO20Uv+1DXA9zNs=; \n\tb=MH75Hvd20Hpy3B57Xah16QBQf7/mBvHb+2kW3mN7rC73NKgZm855lIKpO9a+AsOKHfGhyqH5PWOt9UNALnp52SpXpj+HaiNio3jqb0hhquYddZuxLi07ZHd6G8qzR2egqEKONT9lX0BiDmSAf9OGsM6UM5GlfHaZ3umnwdWtQKY=;", "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mail.ru;\n\ts=mail2; \n\th=Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:Cc:References:To:Subject;\n\tbh=HYeCws3ZAKyC+7KQOZnjTUG4gdGqlO20Uv+1DXA9zNs=; \n\tb=MH75Hvd20Hpy3B57Xah16QBQf7/mBvHb+2kW3mN7rC73NKgZm855lIKpO9a+AsOKHfGhyqH5PWOt9UNALnp52SpXpj+HaiNio3jqb0hhquYddZuxLi07ZHd6G8qzR2egqEKONT9lX0BiDmSAf9OGsM6UM5GlfHaZ3umnwdWtQKY=;" ], "Subject": "[PATCH] net: dccp: Add handling of IPV6_PKTOPTIONS to\n\tdccp_v6_do_rcv()", "To": "David Miller <davem@davemloft.net>", "References": "<20170830090435.58406d1b@dev>\n\t<20170830.221649.818214075248119092.davem@davemloft.net>", "Cc": "gerrit@erg.abdn.ac.uk, netdev@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org, dccp@vger.kernel.org", "From": "Andrii <tulup@mail.ru>", "Message-ID": "<d782f2bb-ade5-62ed-f20f-4854e68a2b93@mail.ru>", "Date": "Thu, 31 Aug 2017 08:28:01 +0300", "User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101\n\tThunderbird/45.8.0", "MIME-Version": "1.0", "In-Reply-To": "<20170830.221649.818214075248119092.davem@davemloft.net>", "Content-Type": "multipart/mixed;\n\tboundary=\"------------C8691BE71D1BFDEA4BD4D82E\"", "X-7FA49CB5": [ "0D63561A33F958A519FEDEC52D060DE997DFBC53944AC966B3D22C443D59E59C725E5C173C3A84C341E1C46B3B046460D98AE6B7CA987B6C79C543ECCDAE434EC4224003CC836476C0CAF46E325F83A50BF2EBBBDD9D6B0F2EF91E2201DEA5EC574AF45C6390F7469DAA53EE0834AAEE", "0D63561A33F958A5E3803173B00255302EAB07D572638041D87F55F5A347D5B4462275124DF8B9C910FF24F588AC80D2BD9CCCA9EDD067B1EDA766A37F9254B7" ], "X-Mailru-Sender": [ "3DEE44A10DFADB60C2BCF497652D6EF8BDE05CB9D8EFCDB13ED72DCBC7801CC1FA0A40D2F7BCE703F1F2485B0B92A2F6928A2593B14EC4C3A05B717206AB936FEAB4BC95F72C04283CDA0F3B3F5B9367", "A5480F10D64C90059EC859477DBBED74FB2FC9299F6C92AD43C8D247F1D7B8EAA67F13341E3B3E322B6532038C16E532FB559BB5D741EB969AF4A27358EA235A0F2DC73CC0BFB1A30DA7A0AF5A3A8387" ], "X-Mras": [ "OK", "OK" ], "Sender": "netdev-owner@vger.kernel.org", "Precedence": "bulk", "List-ID": "<netdev.vger.kernel.org>", "X-Mailing-List": "netdev@vger.kernel.org" }, "content": "Add handling of IPV6_PKTOPTIONS to dccp_v6_do_rcv() in net/dccp/ipv6.c, \nsimilar\nto the handling in net/ipv6/tcp_ipv6.c\n\nSigned-off-by: Andrii Vladyka <tulup@mail.ru>\n---", "diff": "diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c\nindex 1b58eac..35c2edb 100644\n--- a/net/dccp/ipv6.c\n+++ b/net/dccp/ipv6.c\n@@ -16,6 +16,7 @@\n #include <linux/random.h>\n #include <linux/slab.h>\n #include <linux/xfrm.h>\n+#include <linux/string.h>\n \n #include <net/addrconf.h>\n #include <net/inet_common.h>\n@@ -30,6 +31,7 @@\n #include <net/ip6_checksum.h>\n #include <net/xfrm.h>\n #include <net/secure_seq.h>\n+#include <net/sock.h>\n \n #include \"dccp.h\"\n #include \"ipv6.h\"\n@@ -597,19 +599,13 @@ static int dccp_v6_do_rcv(struct sock *sk, struct sk_buff *skb)\n \t\t\t\t\t --ANK (980728)\n \t */\n \tif (np->rxopt.all)\n-\t/*\n-\t * FIXME: Add handling of IPV6_PKTOPTIONS skb. See the comments below\n-\t * (wrt ipv6_pktopions) and net/ipv6/tcp_ipv6.c for an example.\n-\t */\n \t\topt_skb = skb_clone(skb, GFP_ATOMIC);\n \n \tif (sk->sk_state == DCCP_OPEN) { /* Fast path */\n \t\tif (dccp_rcv_established(sk, skb, dccp_hdr(skb), skb->len))\n \t\t\tgoto reset;\n-\t\tif (opt_skb) {\n-\t\t\t/* XXX This is where we would goto ipv6_pktoptions. */\n-\t\t\t__kfree_skb(opt_skb);\n-\t\t}\n+\t\tif (opt_skb)\n+\t\t\tgoto ipv6_pktoptions;\n \t\treturn 0;\n \t}\n \n@@ -640,10 +636,8 @@ static int dccp_v6_do_rcv(struct sock *sk, struct sk_buff *skb)\n \n \tif (dccp_rcv_state_process(sk, skb, dccp_hdr(skb), skb->len))\n \t\tgoto reset;\n-\tif (opt_skb) {\n-\t\t/* XXX This is where we would goto ipv6_pktoptions. */\n-\t\t__kfree_skb(opt_skb);\n-\t}\n+\tif (opt_skb)\n+\t\tgoto ipv6_pktoptions;\n \treturn 0;\n \n reset:\n@@ -653,6 +647,35 @@ static int dccp_v6_do_rcv(struct sock *sk, struct sk_buff *skb)\n \t\t__kfree_skb(opt_skb);\n \tkfree_skb(skb);\n \treturn 0;\n+\n+/* Handling IPV6_PKTOPTIONS skb the similar\n+ * way it's done for net/ipv6/tcp_ipv6.c\n+ */\n+ipv6_pktoptions:\n+\tif (!((1 << sk->sk_state) & (DCCPF_CLOSED | DCCPF_LISTEN))) {\n+\t\tif (np->rxopt.bits.rxinfo || np->rxopt.bits.rxoinfo)\n+\t\t\tnp->mcast_oif = inet6_iif(opt_skb);\n+\t\tif (np->rxopt.bits.rxhlim || np->rxopt.bits.rxohlim)\n+\t\t\tnp->mcast_hops = ipv6_hdr(opt_skb)->hop_limit;\n+\t\tif (np->rxopt.bits.rxflow || np->rxopt.bits.rxtclass)\n+\t\t\tnp->rcv_flowinfo = ip6_flowinfo(ipv6_hdr(opt_skb));\n+\t\tif (np->repflow)\n+\t\t\tnp->flow_label = ip6_flowlabel(ipv6_hdr(opt_skb));\n+\t\tif (ipv6_opt_accepted(sk, opt_skb,\n+\t\t\t\t &DCCP_SKB_CB(opt_skb)->header.h6)) {\n+\t\t\tskb_set_owner_r(opt_skb, sk);\n+\t\t\tmemmove(IP6CB(opt_skb),\n+\t\t\t\t&DCCP_SKB_CB(opt_skb)->header.h6,\n+\t\t\t\tsizeof(struct inet6_skb_parm));\n+\t\t\topt_skb = xchg(&np->pktoptions, opt_skb);\n+\t\t} else {\n+\t\t\t__kfree_skb(opt_skb);\n+\t\t\topt_skb = xchg(&np->pktoptions, NULL);\n+\t\t}\n+\t}\n+\n+\tkfree_skb(opt_skb);\n+\treturn 0;\n }\n \n static int dccp_v6_rcv(struct sk_buff *skb)\n", "prefixes": [] }