Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2479013yba; Mon, 15 Apr 2019 12:30:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqymDh7rQ/2zKCvhvH4h+QRd8083jgcnW958ptFMnST0+IKxRFfB5dWu3WgbavfBJYu+X6TR X-Received: by 2002:a17:902:b484:: with SMTP id y4mr76939923plr.88.1555356618773; Mon, 15 Apr 2019 12:30:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555356618; cv=none; d=google.com; s=arc-20160816; b=eD6eGLZ5myINHpKlb1fxMiMgoAGVrAAJMoyg5BVccRsII84DK2ZXemsphMi22qr6to VJkXW1BEaz0wtTYPFxVAnTEhuyPl6KUnjXNsIp7oyRL3LH8idZFVuq9xK8ARFXczpjT2 HJ9B9f4aFcKRkeIjJ6CyJMncO5xUfPesp2yfBuoKmFcq9SbRKfDbmuPP/TWIVtQ4Zrij hnUBE9eplDFFSyQ+LPlCfyz5ON7Cs5/sbhO3M1QzH+Ql9RYm/7f4MWtVHnOASqVwPcCk nWaBNUdyDkwewqjFVUa92OcY0u8lR9JNtW58BLda4y1WAKXeA1vt+un4CmO/hZ+bMzun E03w== 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=inCDirR6DfOoGUbEtS0UFCvjqAt65nJa+CZja4cKE/c=; b=r0jOJp6ejNh1X8HP3xyzGGptWT38l9kkQQDlsI4We+rYO8fryJs8QDgrUnCbZVrt/s acxyYb/bVqenM8Ckph4wlPLmkFledFtih9wQtgkxPbxdutw6TTkWVc4PYt37eKkL/vNj TFd4dazJh3fnbdMrGIuw1A13F/34yal/Nvh0GcjErT0qiYURwIXfl3V48gcLK0qKyIU4 perHJ0IaSpBQh9WfwmJ9pxBwdwC7Ho1ka5+nQbta45tuAQpp8W+o54AFgqsZ20LaO+Lp /aqdoLNzanv3hKe02D3DMaxbjHPKwSSeydBidHNfmQE/YpHJoYOPVIDUq5koAoTzlCxL UUiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=EKCzN4e1; 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 u192si27636913pgc.282.2019.04.15.12.30.01; Mon, 15 Apr 2019 12:30:18 -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=EKCzN4e1; 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 S1729751AbfDOT2o (ORCPT + 99 others); Mon, 15 Apr 2019 15:28:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:34466 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729048AbfDOTDA (ORCPT ); Mon, 15 Apr 2019 15:03:00 -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 544AD218A1; Mon, 15 Apr 2019 19:02:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1555354979; bh=NzRIEg0zWlu0bSbsWOXJMbU/oZlGSPP0WEqAlQh6CcY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EKCzN4e1Yl7n+4K+/TG5vhkq5CEuHySVSjjuiTkm/aiRkrzjW+3KCOgqwHs5Ccbos HBKgHWsbuNKkPSgMJPseXAzBPkHF51+/S0ovrlXmXbjM8/h+vhs36RYYQpHIcJW6sr FZlN6SMxpYdelaSm64ixtaae5Zxwo9LEl06b72kc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sheena Mira-ato , "David S. Miller" Subject: [PATCH 4.14 37/69] ip6_tunnel: Match to ARPHRD_TUNNEL6 for dev type Date: Mon, 15 Apr 2019 20:58:55 +0200 Message-Id: <20190415183732.246176653@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190415183726.036654568@linuxfoundation.org> References: <20190415183726.036654568@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 From: Sheena Mira-ato [ 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: Greg Kroah-Hartman --- net/ipv6/ip6_tunnel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/net/ipv6/ip6_tunnel.c +++ b/net/ipv6/ip6_tunnel.c @@ -633,7 +633,7 @@ ip4ip6_err(struct sk_buff *skb, struct i IPPROTO_IPIP, RT_TOS(eiph->tos), 0); if (IS_ERR(rt) || - rt->dst.dev->type != ARPHRD_TUNNEL) { + rt->dst.dev->type != ARPHRD_TUNNEL6) { if (!IS_ERR(rt)) ip_rt_put(rt); goto out; @@ -643,7 +643,7 @@ ip4ip6_err(struct sk_buff *skb, struct i ip_rt_put(rt); 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; }