Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp576751img; Fri, 22 Mar 2019 04:23:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqzahX5CSBVv9mC+T3GU7BLFCqzRC+8tiulw7dDPZ02UHwdwFOAv6LV7SRrCNAFPeO3Me/3Z X-Received: by 2002:a17:902:e01:: with SMTP id 1mr9175221plw.128.1553253818371; Fri, 22 Mar 2019 04:23:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553253818; cv=none; d=google.com; s=arc-20160816; b=rrAZudBtZ5/L1wXSukXuOzxHI+QGQDhGQQgq3OEAg6m8FiD08TJohYfunJaooOLXG2 bTy6LhONExZX9tU1Li71gED4PGpUMvocjGVVVDv+JxibSruUI9mbEzIri1fLHPE/bKKg Oe8pC4seYFNiIIcZsqeHtDGXr5nhfDy14esPwhZi6S+cLIRIxIETqLBWf1WCvvyTsnM/ WKl3F+H38gI+sEyQw6X+NWjcPJIXWs3FCMI8al8cOF9ms0jbglZiyyyIzgQ5SLJRF09J gq5AtOlShqwfl1plmPM1QuwTjJL4Q+xseE18vPpFhoctW2ex8yRSto2Uvef12MaZ5PzO tDYw== 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=hIQGnQGehj5tXJzIpW/lhm7BRenqRkhHtKkbO3KSllQ=; b=b+hlk+/IP971LLd80GB/hJSuFWR03CKv4Nv+AJlhIqG5tzb9U9eocR1QxOXzeuwyAx tZmbLs1hnYrjLZyK4LOgAs66p0JdbbVdjOGYa3xocBdjsFS/82GqftPcs8TjVo3wQb/z zNUfFM6Goh95ydmxmk+ebhnGWMOD30mcw8UDPzlc+piEFKBhVxjGttFnl8Dp6i4NMTiD f0OjJgRSuCZtQej4fh0LcSXnWtYRQ9IqRIUUquTtCAfgKKf0zbsFRciiTrNL52fsMkZ0 z6bnIoXQJwIT7VeK4GVA+04hJjVSX/pJiej+2hfur808drM7WTPAEf0xdDrHcLCRV5ut YAIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SBlKi5ak; 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 t3si6701995plo.203.2019.03.22.04.23.20; Fri, 22 Mar 2019 04:23:38 -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=SBlKi5ak; 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 S1728688AbfCVLVx (ORCPT + 99 others); Fri, 22 Mar 2019 07:21:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:48430 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728272AbfCVLVv (ORCPT ); Fri, 22 Mar 2019 07:21:51 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 A3BCE2192D; Fri, 22 Mar 2019 11:21:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553253711; bh=577SNMcgFoCYXFhMezzsolYLHlAbOk5tOJnxMlCoILA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SBlKi5akP3c7LSEHtuHL6rquN72uHAE3dQQho9L2HCihc9n55SO0prHqMtsRJblab XFWUDXTggrBSR3ARXbYT7yhN+9slESu1hdBQulw48SDp99RQOnOUf76mQQr0Cm6gVD zIi8BJakyNAIYiWIeasMPvNl5abRmlP3+EJsDyXg= 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 3.18 048/134] net: Add __icmp_send helper. Date: Fri, 22 Mar 2019 12:14:21 +0100 Message-Id: <20190322111213.421511496@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190322111210.465931067@linuxfoundation.org> References: <20190322111210.465931067@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 3.18-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 @@ -541,7 +541,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; @@ -655,7 +656,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; @@ -707,7 +708,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)