lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YQawRZL6aeBkuDSZ@lunn.ch>
Date:   Sun, 1 Aug 2021 16:31:33 +0200
From:   Andrew Lunn <andrew@...n.ch>
To:     Pali Rohár <pali@...nel.org>
Cc:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: How to find out name or id of newly created interface

On Sat, Jul 31, 2021 at 10:30:54PM +0200, Pali Rohár wrote:
> Hello!
> 
> Via rtnetlink API (RTM_NEWLINK/NLM_F_CREATE) it is possible to create a
> new network interface without specifying neither interface name nor id.
> This will let kernel to choose some interface name which does not
> conflicts with any already existing network interface. So seems like
> ideal way if I do not care about interface names. But at some stage it
> is needed to "configure" interface and for this action it is required to
> know interface id or name (as some ioctls use interface name instead of
> id).

Hi Pali

Looking at __rtnl_newlink() it looks like you can specify the
dev->ifindex when you request the create. So you can leave the kernel
to pick the name, but pick the if_index from user space.

   Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ