Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp2281155imc; Tue, 12 Mar 2019 10:30:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqx/Xl1BqsuNsis/rk9BhDa9aaLqnKToSFYML1auDpo9FSS8MTa6niwqKAQY38E2l8viSPWd X-Received: by 2002:aa7:8c13:: with SMTP id c19mr3256378pfd.247.1552411820558; Tue, 12 Mar 2019 10:30:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552411820; cv=none; d=google.com; s=arc-20160816; b=XNufFYlsb63QJR2dAqqKTuzW28qxEzbwK1dY9eaIJkVnkUAdS89Pv8+mr3H4E6/fKP hA16VNnlJ519Uhe/8d0fqT0QDfzPDurWPHFXXp+b5GRMLTUWQsY27TnKXs57OjS5KhLn SVFOBi+KI46LFDMqWEl2djq0rcSfe62sW2JHLvtuk58LsvyAd222i2XCOs5bW3jkYqwz quSyWvHjOwA3t16JqL9/wqxNbQ5J1jvBc+bDyETOX5P3btMXMJghtyIUlrK+q+ehfckG Rk1CMNoTZF8YqVIAXkD45DsSUbahvf1Gf/nWVcfw8VXh9VOVyp0499J6DZF2/1wwKsYu Nk+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=OO9w3STxG80/dYbyYeG02t6VGec1oalDd95Q2nqAIpY=; b=qxpClOpUZS8SK9J1QkA1ksWge6Y3RvtFBd+c1PVXA2WNMSh8hU+kPSH4qM2OELfP0g zQdsCUSt/0sxyWYi9WXRlp0GLlOLpu8fJJG4P79kjhcJG0nzYjgwg19+oZtasRgECEGh znd7h91iQACQDuRENlODgNqukumxmxDDMg4kBtmf2iAhP5ofZm3yUQya6FafpAvkduu5 Q/Vbshi35E4gQ2BV6fvYyXWw4RZeljMgFkOpPncp3Y9QCT3yxp9I6NW+xPin7i5yWRp7 EZeFwNFf2gY96b8dqZZ9bBIXTcDAwA8tNdLJodSQTJFOWZFTIWDqXZhJJ+ok+XtGxXnx 5jow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=WjE0GbdF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x9si8222914pfm.59.2019.03.12.10.30.05; Tue, 12 Mar 2019 10:30:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=WjE0GbdF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729263AbfCLR1s (ORCPT + 99 others); Tue, 12 Mar 2019 13:27:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:33574 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729660AbfCLRRg (ORCPT ); Tue, 12 Mar 2019 13:17:36 -0400 Received: from localhost (unknown [104.133.8.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5ABF821741; Tue, 12 Mar 2019 17:17:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1552411055; bh=y0uGJNQHFNUt4qmcnnHkvPcpmZ6bMrlX3CCv5odF8uI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WjE0GbdFlmqXlyIoE+Y0ujOcAJno+rBS+j+quo7qk4ukuwRVh8PSQ01zEc7Fl1L0B Brcxe7xLRwnmBo8QWLm5muX9veMcLxjco1SZeTn/nDCadrRJ3YZNDEpM8Sn6NQ9HoP g+CcynmdowG27t265H5pmBg6cVxixCXE2Rkmn9nU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sergey Nazarov , Paul Moore , "David S. Miller" Subject: [PATCH 4.9 23/96] net: Add __icmp_send helper. Date: Tue, 12 Mar 2019 10:09:41 -0700 Message-Id: <20190312171036.260305074@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190312171034.530434962@linuxfoundation.org> References: <20190312171034.530434962@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Nazarov Sergey [ Upstream commit 9ef6b42ad6fd7929dd1b6092cb02014e382c6a91 ] Add __icmp_send function having ip_options struct parameter Signed-off-by: Sergey Nazarov Reviewed-by: Paul Moore Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- include/net/icmp.h | 9 ++++++++- net/ipv4/icmp.c | 7 ++++--- 2 files changed, 12 insertions(+), 4 deletions(-) --- a/include/net/icmp.h +++ b/include/net/icmp.h @@ -22,6 +22,7 @@ #include #include +#include struct icmp_err { int errno; @@ -39,7 +40,13 @@ struct net_proto_family; struct sk_buff; struct net; -void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info); +void __icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info, + const struct ip_options *opt); +static inline void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info) +{ + __icmp_send(skb_in, type, code, info, &IPCB(skb_in)->opt); +} + int icmp_rcv(struct sk_buff *skb); void icmp_err(struct sk_buff *skb, u32 info); int icmp_init(void); --- a/net/ipv4/icmp.c +++ b/net/ipv4/icmp.c @@ -565,7 +565,8 @@ relookup_failed: * MUST reply to only the first fragment. */ -void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info) +void __icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info, + const struct ip_options *opt) { struct iphdr *iph; int room; @@ -679,7 +680,7 @@ void icmp_send(struct sk_buff *skb_in, i iph->tos; mark = IP4_REPLY_MARK(net, skb_in->mark); - if (ip_options_echo(&icmp_param->replyopts.opt.opt, skb_in)) + if (__ip_options_echo(&icmp_param->replyopts.opt.opt, skb_in, opt)) goto out_unlock; @@ -731,7 +732,7 @@ out_free: kfree(icmp_param); out:; } -EXPORT_SYMBOL(icmp_send); +EXPORT_SYMBOL(__icmp_send); static void icmp_socket_deliver(struct sk_buff *skb, u32 info)