From: Daniel Borkmann <dborkman@redhat.com>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: Use CAP_NET_ADMIN and alias netdev-nlmon instead
Date: Sat, 09 Aug 2014 21:32:18 +0200 [thread overview]
Message-ID: <53E67742.9080405@redhat.com> (raw)
In-Reply-To: <7B1A5F4E-7DCD-4054-9E8C-E5511AF64CE3@holtmann.org>
On 08/08/2014 11:22 PM, Marcel Holtmann wrote:
> Hi,
>
> so I am running this command sequence:
>
> ip link add name nlmon type nlmon
> ip link set dev nlmon up
>
> With that I get this message in dmesg:
>
> Loading kernel module for a network device with CAP_SYS_MODULE (deprecated).
> Use CAP_NET_ADMIN and alias netdev-nlmon instead.
>
> The kernel section producing this is dev_load() from net/core/dev_ioctl.c:
>
> no_module = !dev;
> if (no_module && capable(CAP_NET_ADMIN))
> no_module = request_module("netdev-%s", name);
> if (no_module && capable(CAP_SYS_MODULE)) {
> if (!request_module("%s", name))
> pr_warn("Loading kernel module for a network device with CAP_SYS_MODULE (deprecated). Use CAP_NET_ADMIN and alias netdev-%s instead.\n",
> name);
> }
>
> Since I am explicitly giving the name from userspace, I have no idea why the
> kernel bugs me in providing netdev-nlmon alias. It makes no sense to me. What
> is the reasoning behind this?
Could it just be that your process doesn't have CAP_NET_ADMIN set
but CAP_SYS_MODULE instead thus triggering this pr_warn()?
grep Cap /proc/$$/status ?
Hm, I don't think this is nlmon related, above works fine on my side.
next prev parent reply other threads:[~2014-08-09 19:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-08 21:22 Use CAP_NET_ADMIN and alias netdev-nlmon instead Marcel Holtmann
2014-08-09 19:32 ` Daniel Borkmann [this message]
2014-08-09 20:23 ` Marcel Holtmann
2014-08-10 0:03 ` Stephen Hemminger
2014-08-11 20:01 ` Marcel Holtmann
2014-08-13 9:39 ` Daniel Borkmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53E67742.9080405@redhat.com \
--to=dborkman@redhat.com \
--cc=marcel@holtmann.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.