netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Use CAP_NET_ADMIN and alias netdev-nlmon instead
@ 2014-08-08 21:22 Marcel Holtmann
  2014-08-09 19:32 ` Daniel Borkmann
  0 siblings, 1 reply; 6+ messages in thread
From: Marcel Holtmann @ 2014-08-08 21:22 UTC (permalink / raw)
  To: netdev@vger.kernel.org

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?

Regards

Marcel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-08-13  9:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-08 21:22 Use CAP_NET_ADMIN and alias netdev-nlmon instead Marcel Holtmann
2014-08-09 19:32 ` Daniel Borkmann
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).