diff options
author | Stephen Suryaputra <ssuryaextr@gmail.com> | 2019-06-25 03:14:06 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-07-03 14:14:46 +0300 |
commit | 7c92f3efbad04a8677ad75ddab9638c8006617c5 (patch) | |
tree | 829c35442ed4e7c32dea22d0319446a8779efc40 /net | |
parent | 0f3451723ddc06fd23ce3bd0d972a317264c6560 (diff) | |
download | linux-7c92f3efbad04a8677ad75ddab9638c8006617c5.tar.xz |
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>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/raw.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c index 711a5c75bd4b..21800979ed62 100644 --- a/net/ipv4/raw.c +++ b/net/ipv4/raw.c @@ -202,7 +202,7 @@ static int raw_v4_input(struct sk_buff *skb, const struct iphdr *iph, int hash) } 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); |