• Christoph Lameter's avatar
    IB/core: Do not require CAP_NET_ADMIN for packet sniffing · e3b6d8cf
    Christoph Lameter authored
    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: default avatarChristoph Lameter <cl@linux.com>
    Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
    e3b6d8cf
uverbs_cmd.c 87.7 KB