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] [day] [month] [year] [list]
Date:	Wed, 28 May 2008 00:11:58 +0200
From:	Thomas Graf <tgraf@...g.ch>
To:	Matt Domsch <Matt_Domsch@...l.com>
Cc:	David Miller <davem@...emloft.net>, kaber@...sh.net,
	jengelh@...ozas.de, dwmw2@...radead.org, jchapman@...alix.com,
	jonathan@...masters.org, rick.jones2@...com,
	auke-jan.h.kok@...el.com, johnathan@...masters.org,
	netdev@...r.kernel.org
Subject: Re: network interface *name* alias support?

* Matt Domsch <Matt_Domsch@...l.com> 2008-05-27 14:03
> Network devices have no such thing that I can tell.  I get at the
> device names (as presently assigned) by reading /proc/net/dev (I'd be
> happy to be told of a more correct way - this is what net-tools uses.)
> The moment I've finished reading this though, another process can come
> along and change these devices names.  Now every ioctl() my code makes
> could fail because the name (in struct ifreq) is the handle used for
> such calls.  One could argue it's a rare thing to change device
> names...

Regardless of whether you identify the link by name or slot, you
should translate the name/slot to ifindex and use netlink requests
to manipulate links. The ifindex is not going to change and won't
be reused by new links until the (large) counter overflows. Therefore
the chance of modyfing a wrong link is close to zero.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ