On Thu, 19 Mar 2026 20:56:46 +0100 Maxime Chevallier wrote:
> > for_each_netdev_dump(net, netdev, state->ifindex) {
> > + /* Either the provided ifindex doesn't exist or done dumping */
> > + if (ifindex_attr &&
> > + netdev->ifindex != nla_get_u32(ifindex_attr))
> > + break;
>
> If the passed ifindex doesn't exist, isn't netdev NULL here ?The for_each will give us the next netdev after or not enter the loop at all. (the selftest in patch 2 does cover this case FWIW)
