Skip to content

Commit

Permalink
ipv4: Use return value of inet_iif() for __raw_v4_lookup in the while…
Browse files Browse the repository at this point in the history
… loop

In commit 19e4e76 ("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: 19e4e76 ("ipv4: Fix raw socket lookup for local traffic")
Signed-off-by: Stephen Suryaputra <[email protected]>
Reviewed-by: David Ahern <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
ssuryaextr authored and davem330 committed Jun 25, 2019
1 parent 904d88d commit 38c7352
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv4/raw.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,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);
Expand Down

0 comments on commit 38c7352

Please sign in to comment.