Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/807420/?format=api
{ "id": 807420, "url": "http://patchwork.ozlabs.org/api/1.2/patches/807420/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/20170830090435.58406d1b@dev/", "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": "<20170830090435.58406d1b@dev>", "list_archive_url": null, "date": "2017-08-30T06:04:35", "name": "net: dccp: Add handling of IPV6_PKTOPTIONS to dccp_v6_do_rcv()", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": true, "hash": "59ec3f333d362371c7455f9064f335323a277c44", "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/20170830090435.58406d1b@dev/mbox/", "series": [ { "id": 529, "url": "http://patchwork.ozlabs.org/api/1.2/series/529/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=529", "date": "2017-08-30T06:04:35", "name": "net: dccp: Add handling of IPV6_PKTOPTIONS to dccp_v6_do_rcv()", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/529/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/807420/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/807420/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=\"DVxxqbeb\";\n\tdkim=pass (1024-bit key) header.d=mail.ru header.i=@mail.ru\n\theader.b=\"DVxxqbeb\"; dkim-atps=neutral" ], "Received": [ "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xhw4B5DmMz9t0M\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed, 30 Aug 2017 16:06:18 +1000 (AEST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751346AbdH3GGI (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tWed, 30 Aug 2017 02:06:08 -0400", "from fallback11.m.smailru.net ([94.100.179.26]:53516 \"EHLO\n\tfallback.mail.ru\" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org\n\twith ESMTP id S1750803AbdH3GGG (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Wed, 30 Aug 2017 02:06:06 -0400", "from [10.161.22.24] (port=52916 helo=smtp54.i.mail.ru)\n\tby fallback11.m.smailru.net with esmtp (envelope-from\n\t<tulup@mail.ru>)\n\tid 1dmw8Z-00024k-No; Wed, 30 Aug 2017 09:06:03 +0300", "by smtp54.i.mail.ru with esmtpa (envelope-from <tulup@mail.ru>)\n\tid 1dmw81-0006Vp-2Q; Wed, 30 Aug 2017 09:05:29 +0300" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mail.ru;\n\ts=mail2; \n\th=Content-Type:MIME-Version:Message-ID:Subject:Cc:To:From:Date;\n\tbh=xPg7upRj/3Kae5Zpi80CV0tC8akA8ZHu3YtvvXp/Ido=; \n\tb=DVxxqbebqx/I1HMhHHvflADrEZ75qx7i61HkbdSbkoRg+mtJ0oD/f6OdRMygOcisZRqrTAglsSUz+RrHZgbdd6c8xmNMYDXBGtgqntjLcSHm7j2ZUarRkA4T+CL+5oSwtOGiZhlFLIwIw2zVIXNKafVzAV6cWOW445hP5FL9NqY=;", "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mail.ru;\n\ts=mail2; \n\th=Content-Type:MIME-Version:Message-ID:Subject:Cc:To:From:Date;\n\tbh=xPg7upRj/3Kae5Zpi80CV0tC8akA8ZHu3YtvvXp/Ido=; \n\tb=DVxxqbebqx/I1HMhHHvflADrEZ75qx7i61HkbdSbkoRg+mtJ0oD/f6OdRMygOcisZRqrTAglsSUz+RrHZgbdd6c8xmNMYDXBGtgqntjLcSHm7j2ZUarRkA4T+CL+5oSwtOGiZhlFLIwIw2zVIXNKafVzAV6cWOW445hP5FL9NqY=;" ], "Date": "Wed, 30 Aug 2017 09:04:35 +0300", "From": "Andrii Vladyka <tulup@mail.ru>", "To": "gerrit@erg.abdn.ac.uk", "Cc": "davem@davemloft.net, netdev@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org (open list), dccp@vger.kernel.org", "Subject": "[PATCH] net: dccp: Add handling of IPV6_PKTOPTIONS to\n\tdccp_v6_do_rcv()", "Message-ID": "<20170830090435.58406d1b@dev>", "X-Mailer": "Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu)", "MIME-Version": "1.0", "Content-Type": "multipart/mixed; boundary=\"MP_/yNhO8aNFP.q9o_53kE9NWpe\"", "X-7FA49CB5": [ "0D63561A33F958A50ADE8609F71016A09FABAA3562DC35F15D82DB2A0D7E0C13725E5C173C3A84C341E1C46B3B046460FA4D252D7C9B20EB2686C055BC15B7FBC4224003CC836476C0CAF46E325F83A50BF2EBBBDD9D6B0F2EF91E2201DEA5EC574AF45C6390F7469DAA53EE0834AAEE", "0D63561A33F958A5A96E576112F0092D25CEFC0A495CA23B4EF221F343FD43CC462275124DF8B9C910FF24F588AC80D2BD9CCCA9EDD067B1EDA766A37F9254B7" ], "X-Mailru-Sender": [ "3DEE44A10DFADB60C2BCF497652D6EF83A2D341D3A96482172D24C83C18AFA35FA0A40D2F7BCE703F1F2485B0B92A2F6928A2593B14EC4C3A05B717206AB936FEAB4BC95F72C04283CDA0F3B3F5B9367", "A5480F10D64C90054EBC784E05B222901F764C5CF9262FC4058B3351368DE920982BB9711DD006F12B6532038C16E532FB559BB5D741EB969AF4A27358EA235A0F2DC73CC0BFB1A30DA7A0AF5A3A8387" ], "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, similar\nto the handling in net/ipv6/tcp_ipv6.c\n\nSigned-off-by: Andrii Vladyka <tulup@mail.ru>", "diff": "diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c\nindex 1b58eac..fdff10b 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,36 @@ 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+\t\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 sizeof(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": [] }