ifconfig: fix ifconfig crash when compiled w/WITHOUT_NETLINK.

Properly update the recently-introduced `ctx->ifname` when iterating
over interfaces.

Reported by:	Gary Jennejohn <garyj@gmx.de>
MFC after:	2 weeks
This commit is contained in:
Alexander V. Chernikov 2023-06-14 10:37:07 +00:00
parent 3927d0fb37
commit 52ff888318

View file

@ -822,6 +822,7 @@ list_interfaces_ioctl(if_ctx *ctx)
continue;
if (!group_member(ifa->ifa_name, args->matchgroup, args->nogroup))
continue;
ctx->ifname = cp;
/*
* Are we just listing the interfaces?
*/