]> git.baikalelectronics.ru Git - kernel.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)
committerDavid S. Miller <davem@davemloft.net>
Tue, 28 Jun 2016 13:08:51 +0000 (09:08 -0400)
commita06f65aa2c57a6bf84f8cb574a16936c941229e1
tree287669c8a80545d1b958e8f4426e155c7d3efe05
parentd6aa26d61126e9991c5fad174c794fe493e682d2
sock_diag: do not broadcast raw socket destruction

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: b7328d322d25 ("sock_diag: define destruction multicast groups")
Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/sock_diag.h