Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2524786yba; Mon, 15 Apr 2019 13:33:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqxEF+RDlhGZXTNfg89v87pEnSlpQN4GICB2umSbccNxsnWaRSeL25QqEUxRpg0ydQgcLodz X-Received: by 2002:a65:5183:: with SMTP id h3mr72258438pgq.53.1555360431991; Mon, 15 Apr 2019 13:33:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555360431; cv=none; d=google.com; s=arc-20160816; b=Z7eprYxEjJAfTwb1Ddm5dLTRdNVKz36f9rVDAylAhZgEY2W4UrgM/AUVTWQqF50LRH Z2RCk8cPqqXoXMTWctXzl36mMn6eXdFUCIgfzKde8xNaZtOyaEDbvBHPp9E19hx/pRpF g7p9wR7GtsMzMT9ifhyPY4ZXMawJOuUUz/ziSU8KD9QUpUu+1OkgQdK0l1NFTWsSfJoq l5yPn5qESsKxhLjE8LCWU4S2MP12J9gAggmYDOmYljFESkbkNB+ESqA6NtW2wiOkdjD/ QwRn6Ba0aCx0D9HFcZXl9PU/d4Itq9vXQIJt4W0o1e7JWjGEEBZ5jdVs8xapavyyfDtr TexQ== 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=+A3fkA1ekX/YyYua+UMwkVwYhG/z5no2Ip/d78Bes3g=; b=I4S1r0BW6YA4CocFA0yWLp2bp3He0lM7s1uIaAhuaVABbBzWzus61mBzJs5qfAbSK4 LoQimRxFEQC0DZzr16bwREWUtDGhuY2vvkWJrJaoOAnv+Ic3ClbjVfsUu9JcqzVOvFIO mhtZhBLfrrIa9sC9Bs2uy9n3XMqslPSDwAsTGd92LuxV6qP19IZLLIe9r56CwJqZtyg4 0ubnl1TeAfV/fxC2gQIH3uqHsWoQy3gEOq6TlDxtZpGETjFg/aTSeoOIvY+9IrNOaSMD xubBknNnGEYJvtgMYXyZ4qcc7WYzY1mmPc5AvNwoD/TCVgwfj3I3N9RGkAG+FJD2srWI C1wA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=f2dUB4qb; 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 y11si37892751pgp.495.2019.04.15.13.33.35; Mon, 15 Apr 2019 13:33:51 -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=f2dUB4qb; 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 S1730706AbfDOTZt (ORCPT + 99 others); Mon, 15 Apr 2019 15:25:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:38668 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729673AbfDOTFJ (ORCPT ); Mon, 15 Apr 2019 15:05:09 -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 10F402087C; Mon, 15 Apr 2019 19:05:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1555355108; bh=rQphpVjouBAQr1c3g7nBTLSvw6Ia9Nq0X1ElDqoDqio=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=f2dUB4qb3wU44l8XzlYl2woDcXP6tv9UiYJFfEwkuGkTxyx7sciw1NSPpDXA94FjU 1feXg643WfYE95KcKenb/kc/zDSxL0j4C8cbfJ/66PMAIaaJ1DTFhm6do5T3Xmj9d4 6a174YnrIYy/0sKEWCCnLvGaIqb/NVXNIj1WC/FI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sheena Mira-ato , "David S. Miller" , Sasha Levin Subject: [PATCH 4.19 006/101] ip6_tunnel: Match to ARPHRD_TUNNEL6 for dev type Date: Mon, 15 Apr 2019 20:58:04 +0200 Message-Id: <20190415183740.688095494@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190415183740.341577907@linuxfoundation.org> References: <20190415183740.341577907@linuxfoundation.org> User-Agent: quilt/0.66 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 [ Upstream commit b2e54b09a3d29c4db883b920274ca8dca4d9f04d ] The device type for ip6 tunnels is set to ARPHRD_TUNNEL6. However, the ip4ip6_err function is expecting the device type of the tunnel to be ARPHRD_TUNNEL. Since the device types do not match, the function exits and the ICMP error packet is not sent to the originating host. Note that the device type for IPv4 tunnels is set to ARPHRD_TUNNEL. Fix is to expect a tunnel device type of ARPHRD_TUNNEL6 instead. Now the tunnel device type matches and the ICMP error packet is sent to the originating host. Signed-off-by: Sheena Mira-ato Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- net/ipv6/ip6_tunnel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c index 0c6403cf8b52..ade1390c6348 100644 --- a/net/ipv6/ip6_tunnel.c +++ b/net/ipv6/ip6_tunnel.c @@ -627,7 +627,7 @@ ip4ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, rt = ip_route_output_ports(dev_net(skb->dev), &fl4, NULL, eiph->daddr, eiph->saddr, 0, 0, IPPROTO_IPIP, RT_TOS(eiph->tos), 0); - if (IS_ERR(rt) || rt->dst.dev->type != ARPHRD_TUNNEL) { + if (IS_ERR(rt) || rt->dst.dev->type != ARPHRD_TUNNEL6) { if (!IS_ERR(rt)) ip_rt_put(rt); goto out; @@ -636,7 +636,7 @@ ip4ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, } else { if (ip_route_input(skb2, eiph->daddr, eiph->saddr, eiph->tos, skb2->dev) || - skb_dst(skb2)->dev->type != ARPHRD_TUNNEL) + skb_dst(skb2)->dev->type != ARPHRD_TUNNEL6) goto out; } -- 2.19.1