]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
sock_diag: do not broadcast raw socket destruction
authorWillem de Bruijn <willemb@google.com>
Fri, 24 Jun 2016 20:02:35 +0000 (16:02 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 11 Jul 2016 16:31:11 +0000 (09:31 -0700)
commit348a1cd82cfc4c4b4f7b6775aae398c337cc03b8
treea0768c01d10eb39b9f622b19d7b61904bf168325
parent688feac4897c2a613d730e48b83e3ba4084953be
sock_diag: do not broadcast raw socket destruction

[ Upstream commit 9a0fee2b552b1235fb1706ae1fc664ae74573be8 ]

Diag intends to broadcast tcp_sk and udp_sk socket destruction.
Testing sk->sk_protocol for IPPROTO_TCP/IPPROTO_UDP alone is not
sufficient for this. Raw sockets can have the same type.

Add a test for sk->sk_type.

Fixes: eb4cb008529c ("sock_diag: define destruction multicast groups")
Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/sock_diag.h