Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1669028yba; Thu, 25 Apr 2019 03:51:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqzS6qdDdntNbaHrqrlU+Eo+KiK0F/1u8j+KHsKD1eLRbKYJLoebVT01TXrfcUjKvlKJX5eL X-Received: by 2002:a17:902:70ca:: with SMTP id l10mr1093677plt.228.1556189506499; Thu, 25 Apr 2019 03:51:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556189506; cv=none; d=google.com; s=arc-20160816; b=VIvwULiq60DSLVp15/o14AYReXYdEL6lY+3qd/V1vqP8f0pA84zwIfm4yFrn9998M0 lSMvxaHBefbLAtTzq5SxR6P09vezSq8zg2qZfZJZtWZzg8no8lRPDoFskdZB9hAUYab4 MMhDV1lVGb6oEU8stlVnOeJKo0oqpkr1e3cSh7YfzJamXl4qKALz9grb+AnMhinZbhok 4vUig7wYzZ+yvfM7D6CCY0mHkIHtSdvPm/TPX1KSW3MxNvpyhzC3ujkRl/3/P5zedfYT GqIoJy50cU7Ieb7S2obuPdrJ2Bh4W6wL/i7ZdPOlELQCoFAMO7SuO4b+HOakHQPBrK1O sA+g== 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=bQ19PoyVd6chmoFaKKSwC8rjV8X36dSqrGQgVHJclb8=; b=q63cN0QHuPEBd0kMIRk6fqptIdw1JSwCWHzv7XDjAb5aECf9aKw1atOVW+tGIqnMvu Epg6PQqEOX+h0V1AOfluMcL/9wNGSyD0B9LJcr+pqCwUeJdsSFfzAAwWF/VFCI7dZfwZ WKXi2iGhirDQM4xwCJWwSk1gdpiBucOR3stzaiP3rnY27Wibd7y7GtJF7RZGpD3KkDxI 2wn+LjJIaj1prGqRv/K5sLHpwpP2j7kXiT8vN6V+9bkxQijgq2fP7MvUEm8JSFOOfU4d AEPUQvXMq2MaaI5ADW3g1AcT9nVSZue2DelTU4e92u3xWNzqJMMvWDiTtOSiD5Fi8rHM B9Eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=WGRlx+8r; 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 27si22691770pfr.146.2019.04.25.03.51.31; Thu, 25 Apr 2019 03:51:46 -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=WGRlx+8r; 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 S2389649AbfDXSEU (ORCPT + 99 others); Wed, 24 Apr 2019 14:04:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:44688 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388165AbfDXRT1 (ORCPT ); Wed, 24 Apr 2019 13:19:27 -0400 Received: from localhost (62-193-50-229.as16211.net [62.193.50.229]) (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 3485821915; Wed, 24 Apr 2019 17:19:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1556126366; bh=hlONfSzjJg5fgtnLZI6dd6qUWiP3++aLO/I8xtegk8E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WGRlx+8rJuFSCX7P2ak5Ofj6C4OnmWLk/oSeYh8O4iyBYqZOkrXs+KN1ZLa6cTyUJ YToUXUbWarfoqvJRJPWPUJhUjrAFsvFudT2FDT9pfasDD1BRpvWs+6DZZVSJJWvdvn PEeJCdV1x8twCOfWyyakmGBDeZQa6Gs2cJXw/z24= 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.4 086/168] ip6_tunnel: Match to ARPHRD_TUNNEL6 for dev type Date: Wed, 24 Apr 2019 19:08:50 +0200 Message-Id: <20190424170928.880304574@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190424170923.452349382@linuxfoundation.org> References: <20190424170923.452349382@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 @@ -622,7 +622,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; @@ -632,7 +632,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; }