diff options
author | Alexander V. Chernikov <melifaro@FreeBSD.org> | 2023-06-14 10:37:07 +0000 |
---|---|---|
committer | Alexander V. Chernikov <melifaro@FreeBSD.org> | 2023-06-14 10:37:07 +0000 |
commit | 52ff8883185ad6ffa21fd0d01db1426e5c13af83 (patch) | |
tree | 6ab38155411a0af9fbc320a16b7dd739048e5574 | |
parent | 3927d0fb373c04e99403c9a773312f650607441c (diff) | |
download | src-52ff8883185ad6ffa21fd0d01db1426e5c13af83.tar.gz src-52ff8883185ad6ffa21fd0d01db1426e5c13af83.zip |
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
-rw-r--r-- | sbin/ifconfig/ifconfig.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c index d30d3e1909ae..6a80ad5763b2 100644 --- a/sbin/ifconfig/ifconfig.c +++ b/sbin/ifconfig/ifconfig.c @@ -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? */ |