]> git.baikalelectronics.ru Git - kernel.git/commit
IB/core: Do not require CAP_NET_ADMIN for packet sniffing
authorChristoph Lameter <cl@linux.com>
Fri, 13 May 2016 15:52:26 +0000 (10:52 -0500)
committerDoug Ledford <dledford@redhat.com>
Wed, 18 May 2016 14:31:58 +0000 (10:31 -0400)
commitbd01c75094adac6b006840d74d781786c1a499f9
treeafca4bcdc24a7fd084c6ab0ffef7214d680432b7
parent5de5e6be32e186c859b4f9cc9f01fe85d791d9c6
IB/core: Do not require CAP_NET_ADMIN for packet sniffing

In the Ethernet/TCP world, CAP_NET_RAW is sufficient to allow a program
to listen to all incoming packets on a specific interface, and the
higher CAP_NET_ADMIN is required to set the interface into promiscuous
mode.  We want to emulate that same basic division of privilege in the
RDMA stack, so when dealing with Raw Ethernet QPs, allow apps with
CAP_NET_RAW to listen to all incoming flows (and direct them as they see
fit in their own listen stream).  Do not require CAP_NET_ADMIN just to
listen to traffic already incoming.  Reserve CAP_NET_ADMIN if we attempt
to set promiscuous mode.

Signed-off-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/uverbs_cmd.c