From patchwork Mon Jun 20 13:36:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huw Davies X-Patchwork-Id: 9187519 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EDCC5607D1 for ; Mon, 20 Jun 2016 14:01:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D91742780C for ; Mon, 20 Jun 2016 14:01:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CDADD2787C; Mon, 20 Jun 2016 14:01:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from emsm-gh1-uea10.nsa.gov (emsm-gh1-uea10.nsa.gov [8.44.101.8]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 45A7F2780C for ; Mon, 20 Jun 2016 14:01:36 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.26,498,1459814400"; d="scan'208";a="14811510" IronPort-PHdr: =?us-ascii?q?9a23=3AcxJoVBdfx5JfWq9km+4+L6gVlGMj4u6mDksu8pMi?= =?us-ascii?q?zoh2WeGdxc+7YR7h7PlgxGXEQZ/co6odzbGG4uaxBCdevt6oizMrTt9lb1c9k8?= =?us-ascii?q?IYnggtUoauKHbQC7rUVRE8B9lIT1R//nu2YgB/Ecf6YEDO8DXptWZBUiv2OQc9?= =?us-ascii?q?HOnpAIma153xjLDjvcyOKFsXzBOGIppMbzyO5T3LsccXhYYwYo0Q8TDu5kVyRu?= =?us-ascii?q?JN2GlzLkiSlRuvru25/Zpk7jgC86l5r50IbL/+N5gcYfQYSW1+cjN92Mq+sxTf?= =?us-ascii?q?QQaRzmUTX39QkRdSBQXBqhbgUdO5tir8q/o4wySRINf3UaFxXDOu8qNmYAHnhT?= =?us-ascii?q?1BNDMj9mzTzMtqg+YTux+lphpi06bIcYqVM7x4ZaqbctQEFkRbWcMEdzFeSq+1?= =?us-ascii?q?cYoCFKJVPftHh4L6q1YRoBKgCBO3Qujoz2kb1TfNwaQm3rF5Qkn91ws6EodL6S?= =?us-ascii?q?zZ?= X-IPAS-Result: =?us-ascii?q?A2FzBQAF9mdX/wHyM5BdHQGDIIFTvFUihzNMAQEBAQEBAgJ?= =?us-ascii?q?iJ4IxDzk8AQEBAQEBIwINZgI3BgEBDCAMAgMJAhcpCAgDAS0LChgHCwUYBIgPr?= =?us-ascii?q?0GFKQEBBYt9CI8GEQGCZQtAgkeYe44siVqFRkiPL1SDcW2JE4E1AQEB?= Received: from unknown (HELO tarius.tycho.ncsc.mil) ([144.51.242.1]) by emsm-gh1-uea10.nsa.gov with ESMTP; 20 Jun 2016 14:01:21 +0000 Received: from prometheus.infosec.tycho.ncsc.mil (prometheus [192.168.25.40]) by tarius.tycho.ncsc.mil (8.14.4/8.14.4) with ESMTP id u5KDwWo9016730; Mon, 20 Jun 2016 09:59:54 -0400 Received: from tarius.tycho.ncsc.mil (tarius.infosec.tycho.ncsc.mil [144.51.242.1]) by prometheus.infosec.tycho.ncsc.mil (8.15.2/8.15.2) with ESMTP id u5KDbJXZ090400 for ; Mon, 20 Jun 2016 09:37:19 -0400 Received: from goalie.tycho.ncsc.mil (goalie [144.51.242.250]) by tarius.tycho.ncsc.mil (8.14.4/8.14.4) with ESMTP id u5KDbIP0013705 for ; Mon, 20 Jun 2016 09:37:19 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A1DJAgDV8GdXfYO9+9heHAEBhHO4VoN+CxeGAIEzTAEBAQEBARMBARYzhH5DAQE3AYEcIhKIMK9OhSkBAQWLUikIkX0LQIJHmHuOLI8gSI8vgk+BdjsyikgBAQE X-IPAS-Result: A1DJAgDV8GdXfYO9+9heHAEBhHO4VoN+CxeGAIEzTAEBAQEBARMBARYzhH5DAQE3AYEcIhKIMK9OhSkBAQWLUikIkX0LQIJHmHuOLI8gSI8vgk+BdjsyikgBAQE X-IronPort-AV: E=Sophos;i="5.26,498,1459828800"; d="scan'208";a="5526686" Received: from emsm-gh1-uea11.corp.nsa.gov (HELO emsm-gh1-uea11.nsa.gov) ([10.208.41.37]) by goalie.tycho.ncsc.mil with ESMTP; 20 Jun 2016 09:37:20 -0400 IronPort-PHdr: =?us-ascii?q?9a23=3A0V/vCRzx6/pqgrvXCy+O+j09IxM/srCxBDY+r6Qd?= =?us-ascii?q?0OgUIJqq85mqBkHD//Il1AaPBtWKraMZwLSK+4nbGkU+or+5+EgYd5JNUxJXwe?= =?us-ascii?q?43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6anHS+4HYoFwnlMkIt?= =?us-ascii?q?f6KuSt+U3pn8ibz60qaQSjsLrQL1Wal1IhSyoFeZnegtqqwmFJwMzADUqGBDYe?= =?us-ascii?q?VcyDAgD1uSmxHh+pX4p8Y7oGx48sgs/M9YUKj8Y79wDfkBVGxnYCgJ45jtuAXP?= =?us-ascii?q?QBWn+HQRSCMVnwBODgyD6wv1Gt/1sy3npq9m1SKHJ8zqXPUxXji/66pDVhDlkm?= =?us-ascii?q?EEOiQ//WWRjdZ/yOpArRagoQFv65LFa4GScvxld+XSes1Ja3BGW5NxSjMJLoqi?= =?us-ascii?q?boYUR74BIPlwpI7xqkQDpAWzHxLqD+TqnGwbzkTq1LE3hrxyWTrN2xYtSpdX6C?= =?us-ascii?q?zZ?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0EiAwAV8WdXfYO9+9heHAEBhHO4VoN+C?= =?us-ascii?q?xeGAIEzTAEBAQEBAQICDwEBFjMvgjEPOTwBAQEBAQEjAg1iQwEBNwGBHCISiDC?= =?us-ascii?q?vToUpAQEFi1IpCJF9C0CCR5h7jiyPIEiPL4JPgXY7MopIAQEB?= X-IPAS-Result: =?us-ascii?q?A0EiAwAV8WdXfYO9+9heHAEBhHO4VoN+CxeGAIEzTAEBAQE?= =?us-ascii?q?BAQICDwEBFjMvgjEPOTwBAQEBAQEjAg1iQwEBNwGBHCISiDCvToUpAQEFi1IpC?= =?us-ascii?q?JF9C0CCR5h7jiyPIEiPL4JPgXY7MopIAQEB?= X-IronPort-AV: E=Sophos;i="5.26,498,1459814400"; d="scan'208";a="17034977" Received: from mail.codeweavers.com ([216.251.189.131]) by emsm-gh1-uea11.nsa.gov with ESMTP/TLS/DHE-RSA-AES128-SHA; 20 Jun 2016 13:37:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=codeweavers.com; s=6377696661; h=Message-Id:Date:Subject:Cc:To:From; bh=jZlKlVoLTFNJUADU7dmZZ4W4H36njjxdbzSVMs7bnaE=; b=x+tKjaXwEDgvSamyr6x0hlysRxFwO9lsewoNVDlKPMXT5VazUCxJ7Go7A60RXh/G7L+QJIrPcqfYKAp7xkg4fujTS+5K4pZHeRW50Lf79YDCy87IEPD0lUGJsVssmpNRd7qVMcW54x7Xk/NQmW9W8WnDuO/K9WPSfZ5groD7zQc=; Received: from vpn38.vpn.mn.codeweavers.com ([10.69.139.38] helo=merlot.physics.ox.ac.uk) by mail.codeweavers.com with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1bEzO4-00028t-1a; Mon, 20 Jun 2016 08:37:13 -0500 Received: from daviesh by merlot.physics.ox.ac.uk with local (Exim 4.86_2) (envelope-from ) id 1bEzNt-0003Ll-VZ; Mon, 20 Jun 2016 14:37:02 +0100 From: Huw Davies To: netdev@vger.kernel.org, linux-security-module@vger.kernel.org, selinux@tycho.nsa.gov Subject: [PATCH v4 14/19] ipv6: constify the skb pointer of ipv6_find_tlv(). Date: Mon, 20 Jun 2016 14:36:54 +0100 Message-Id: <1466429819-12707-15-git-send-email-huw@codeweavers.com> X-Mailer: git-send-email 2.7.4 X-BeenThere: selinux@tycho.nsa.gov X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Security-Enhanced Linux \(SELinux\) mailing list" List-Post: List-Help: MIME-Version: 1.0 Errors-To: selinux-bounces@tycho.nsa.gov Sender: "Selinux" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Huw Davies --- include/net/ipv6.h | 2 +- net/ipv6/exthdrs_core.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/net/ipv6.h b/include/net/ipv6.h index 22c7a37..3e59785 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h @@ -945,7 +945,7 @@ enum { int ipv6_find_hdr(const struct sk_buff *skb, unsigned int *offset, int target, unsigned short *fragoff, int *fragflg); -int ipv6_find_tlv(struct sk_buff *skb, int offset, int type); +int ipv6_find_tlv(const struct sk_buff *skb, int offset, int type); struct in6_addr *fl6_update_dst(struct flowi6 *fl6, const struct ipv6_txoptions *opt, diff --git a/net/ipv6/exthdrs_core.c b/net/ipv6/exthdrs_core.c index 9508a20..305e2ed 100644 --- a/net/ipv6/exthdrs_core.c +++ b/net/ipv6/exthdrs_core.c @@ -112,7 +112,7 @@ int ipv6_skip_exthdr(const struct sk_buff *skb, int start, u8 *nexthdrp, } EXPORT_SYMBOL(ipv6_skip_exthdr); -int ipv6_find_tlv(struct sk_buff *skb, int offset, int type) +int ipv6_find_tlv(const struct sk_buff *skb, int offset, int type) { const unsigned char *nh = skb_network_header(skb); int packet_len = skb_tail_pointer(skb) - skb_network_header(skb);