summaryrefslogtreecommitdiffstats
path: root/net/ipv4/ping.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-01-30 15:00:39 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-01-30 15:00:39 +0100
commit7ab004dbcbee38b8a70798835d3ffcd97a985a5e (patch)
tree0caa6cb97801736046823ca785a5ba36bf684ac6 /net/ipv4/ping.c
parent710f8af199ee9d72dd87083edd55c5ee250ee6f4 (diff)
parent26291c54e111ff6ba87a164d85d4a4e134b7315c (diff)
downloadlinux-stable-7ab004dbcbee38b8a70798835d3ffcd97a985a5e.tar.gz
linux-stable-7ab004dbcbee38b8a70798835d3ffcd97a985a5e.tar.bz2
linux-stable-7ab004dbcbee38b8a70798835d3ffcd97a985a5e.zip
Merge tag 'v5.17-rc2' into char-misc-next
We need the char/misc fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/ipv4/ping.c')
-rw-r--r--net/ipv4/ping.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c
index 0e56df3a45e2..bcf7bc71cb56 100644
--- a/net/ipv4/ping.c
+++ b/net/ipv4/ping.c
@@ -220,7 +220,8 @@ static struct sock *ping_lookup(struct net *net, struct sk_buff *skb, u16 ident)
continue;
}
- if (sk->sk_bound_dev_if && sk->sk_bound_dev_if != dif)
+ if (sk->sk_bound_dev_if && sk->sk_bound_dev_if != dif &&
+ sk->sk_bound_dev_if != inet_sdif(skb))
continue;
sock_hold(sk);