Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3053698ybi; Tue, 2 Jul 2019 01:13:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqwHeTQ54N4wfxeEc8ChdLNvjAUXbzrwmGfQ4Im+28qce8duQZQloZ7zzdTs3Z97L9lhX/oq X-Received: by 2002:a17:902:2ae7:: with SMTP id j94mr33977014plb.270.1562055195500; Tue, 02 Jul 2019 01:13:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562055195; cv=none; d=google.com; s=arc-20160816; b=wZ110j5K98L/nM8Y65JTTX1CjVhGpRTOSU5Ys86AoZIdK1CTYOjXv9p7Tv6fTZ/XUx CAKK88Y7CTxkqKCfzWKKwWs2+561Qzm2DV+bQGQLLwOTiL0agBHpTRR5quukmQTlJUyM wlAchblt63msAXnXiNvlVVMiho2xY0PbKmvrxZILsI5UDBceiQEoAy4QQkZ1jE27dUS+ 9TI6j9tgzFiS8TiHIAHRWmwiq0wI1Oa8DLgSKgmRmSwRxHcAF1v12HyHDeHJbn6cVpE+ aABcFWemBjCKBgwNol65z19wHwpL1oKynmi+Z6vD7ARlL9BoBfqxzakebHpSJGLoFzwT Lldw== 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=FPzpW0/eV/goCUrXyg1BycOHuBeWZxOs4CBdsj20oEc=; b=k5A9DxNrYe3TYQHuYdGw6tpg4+EhGk45EHRYYqEGg7AtxQrmGn4PAQJFFswiyarHb5 PoYxcwVQye9VjJu+7GQguEqflsvO0R0akChuFiYDJlWjv5wrySQ+wET33bP/6Nf92VHf cYv5h5I7q9muzdRcrPj3B2CE51F0Ylte2gBaV5ik5kHizB1C69IX98/lMUu0J3HZApL2 BqHeANKhxErWmQvDuwXL6GSmZPZetXUi8vMRyaYsKB/PWttCrMVyUyai0Pw6T42fCmsZ PxHsdaCuvYWodTlEQPRewopBnOtU7+YwXS7Xzha6HwvN81V7wksZi8d3AgMt4MiLIXm2 mkMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Y8oRPAZh; 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 s22si12952325pga.189.2019.07.02.01.13.01; Tue, 02 Jul 2019 01:13:15 -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=Y8oRPAZh; 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 S1728911AbfGBIKx (ORCPT + 99 others); Tue, 2 Jul 2019 04:10:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:59754 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728905AbfGBIKv (ORCPT ); Tue, 2 Jul 2019 04:10: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 CD5D3206A2; Tue, 2 Jul 2019 08:10:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562055051; bh=yiP3Sq6ymMeBy7v+5x8iXCXmnDROKysut4vXujWK5R0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Y8oRPAZh2dsn1YmnLgfrjSEdHCgOyBwiM8EVvlq5Ji5VIcg1KuibgqWtVNPfCLv+O aICl+c5A2N961hj6Js05r6KjMyNY1oJXVJFNc+5eE9ly7g1nuhQwRwbMF22QfMF3xj QnlLWhPqiRh6GemOM4GwtILxea9KigcTu/eDYHg8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stephen Suryaputra , David Ahern , "David S. Miller" Subject: [PATCH 4.14 28/43] ipv4: Use return value of inet_iif() for __raw_v4_lookup in the while loop Date: Tue, 2 Jul 2019 10:02:08 +0200 Message-Id: <20190702080125.298555992@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190702080123.904399496@linuxfoundation.org> References: <20190702080123.904399496@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: Stephen Suryaputra [ Upstream commit 38c73529de13e1e10914de7030b659a2f8b01c3b ] In commit 19e4e768064a8 ("ipv4: Fix raw socket lookup for local traffic"), the dif argument to __raw_v4_lookup() is coming from the returned value of inet_iif() but the change was done only for the first lookup. Subsequent lookups in the while loop still use skb->dev->ifIndex. Fixes: 19e4e768064a8 ("ipv4: Fix raw socket lookup for local traffic") Signed-off-by: Stephen Suryaputra Reviewed-by: David Ahern Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/ipv4/raw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/ipv4/raw.c +++ b/net/ipv4/raw.c @@ -202,7 +202,7 @@ static int raw_v4_input(struct sk_buff * } sk = __raw_v4_lookup(net, sk_next(sk), iph->protocol, iph->saddr, iph->daddr, - skb->dev->ifindex, sdif); + dif, sdif); } out: read_unlock(&raw_v4_hashinfo.lock);