Skip to content

Commit 38c7352

Browse files
ssuryaextrdavem330
authored andcommitted
ipv4: Use return value of inet_iif() for __raw_v4_lookup in the while 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]>
1 parent 904d88d commit 38c7352

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/ipv4/raw.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ static int raw_v4_input(struct sk_buff *skb, const struct iphdr *iph, int hash)
197197
}
198198
sk = __raw_v4_lookup(net, sk_next(sk), iph->protocol,
199199
iph->saddr, iph->daddr,
200-
skb->dev->ifindex, sdif);
200+
dif, sdif);
201201
}
202202
out:
203203
read_unlock(&raw_v4_hashinfo.lock);

0 commit comments

Comments
 (0)