]> git.baikalelectronics.ru Git - kernel.git/commit
net: diag: allow socket bytecode filters to match socket marks
authorLorenzo Colitti <lorenzo@google.com>
Wed, 24 Aug 2016 06:46:26 +0000 (15:46 +0900)
committerDavid S. Miller <davem@davemloft.net>
Thu, 25 Aug 2016 04:57:20 +0000 (21:57 -0700)
commite4a72cbd02cbea69f3f9f3b58f6d0fc248b7638d
tree92e3d29500ba58f2069f70a064d224f299a4a4b0
parentc334523ef49ac79b81de122f5124c020f1e0154a
net: diag: allow socket bytecode filters to match socket marks

This allows a privileged process to filter by socket mark when
dumping sockets via INET_DIAG_BY_FAMILY. This is useful on
systems that use mark-based routing such as Android.

The ability to filter socket marks requires CAP_NET_ADMIN, which
is consistent with other privileged operations allowed by the
SOCK_DIAG interface such as the ability to destroy sockets and
the ability to inspect BPF filters attached to packet sockets.

Tested: https://android-review.googlesource.com/261350
Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
Acked-by: David Ahern <dsa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/uapi/linux/inet_diag.h
net/ipv4/inet_diag.c