ipv4: Use return value of inet_iif() for __raw_v4_lookup in the while loop
authorStephen Suryaputra <ssuryaextr@gmail.com>
Tue, 25 Jun 2019 00:14:06 +0000 (20:14 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Jul 2019 07:55:41 +0000 (09:55 +0200)
commit4451dc92e5bbd31363dac5c82fc35080b330933b
treeafaf4764026b9f69825018567a4f2211d891c847
parentb93a8c23a330bc4d79336a661e7c6eed5318130c
ipv4: Use return value of inet_iif() for __raw_v4_lookup in the while loop

[ 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 <ssuryaextr@gmail.com>
Reviewed-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv4/raw.c