Re: [PATCH net-next 1/1] rtnetlink: request RTM_GETLINK by pid or fd

From: Nicolas Dichtel
Date: Wed Jan 24 2018 - 05:53:23 EST


Le 23/01/2018 Ã 18:08, Jiri Benc a ÃcritÂ:
> On Tue, 23 Jan 2018 17:37:11 +0100, Nicolas Dichtel wrote:
>> When a virtual interface moves to another netns, the netlink RTM_DELLINK message
>> contains the attribute IFLA_NEW_NETNSID, which identifies where the interface
>> moves. The nsid may be allocated if needed.
>
> The problem is that ifindex may change and it's not announced. The only
> way is to track both ifindex and ifname, watch for the ifname to appear
> in the target netns and update the application's view of ifindex.
Yes, you're right.

>
> It would be much better if the whole (ifindex, netnsid) pair was
> returned. I think it could be added.
Sure. Do you plan to send a patch?

>
>> I don't know if it's acceptable to also allocate an nsid in case of a physical
>> interface.
>
> I think we need that.
If you agree, I can send a patch to remove this limitation.


Regards,
Nicolas