summaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorStephen Suryaputra <ssuryaextr@gmail.com>2019-06-24 20:14:06 -0400
committerBen Hutchings <ben@decadent.org.uk>2019-09-23 21:12:01 +0100
commit0c0c20a940b19138e42b57a68c2b1aafbb9846de (patch)
tree8cde779933ff5e09360be6db978590422fb43b21 /net/ipv4
parent42e9b805a5a334c8673dd204415977abea57d71a (diff)
downloadlinux-stable-0c0c20a940b19138e42b57a68c2b1aafbb9846de.tar.gz
linux-stable-0c0c20a940b19138e42b57a68c2b1aafbb9846de.tar.bz2
linux-stable-0c0c20a940b19138e42b57a68c2b1aafbb9846de.zip
ipv4: Use return value of inet_iif() for __raw_v4_lookup in the while loop
commit 38c73529de13e1e10914de7030b659a2f8b01c3b upstream. 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> [bwh: Backported to 3.16: adjust context] Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/raw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c
index 2e0a0f05c4de..a464eb7b962a 100644
--- a/net/ipv4/raw.c
+++ b/net/ipv4/raw.c
@@ -193,7 +193,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);
+ dif);
}
out:
read_unlock(&raw_v4_hashinfo.lock);