Re: How to find out name or id of newly created interface
From: Andrew Lunn
Date: Mon Aug 02 2021 - 10:21:17 EST
> Hello! This has additional issue that I have to choose some free ifindex
> number and it introduce another race condition that other userspace
> process may choose same ifindex number. So create request in this case
> fails if other userspace process is faster... So it has same race
> condition as specifying interface name.
O.K. if you don't want to deal with retries, you are going to have to
modify the return value. The nice thing is, its netlink. So you can
add additional attributes, and not break backwards compatibility. User
space should ignore all attributes it does not expect.
But i suspect the architecture of the code is not going to make it
easy.
Andrew