Date: Wed, 14 Jun 2023 10:40:06 GMT From: "Alexander V. Chernikov" <melifaro@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 52ff8883185a - main - ifconfig: fix ifconfig crash when compiled w/WITHOUT_NETLINK. Message-ID: <202306141040.35EAe6rs021820@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=52ff8883185ad6ffa21fd0d01db1426e5c13af83 commit 52ff8883185ad6ffa21fd0d01db1426e5c13af83 Author: Alexander V. Chernikov <melifaro@FreeBSD.org> AuthorDate: 2023-06-14 10:37:07 +0000 Commit: Alexander V. Chernikov <melifaro@FreeBSD.org> CommitDate: 2023-06-14 10:37:07 +0000 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 --- sbin/ifconfig/ifconfig.c | 1 + 1 file changed, 1 insertion(+) 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? */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202306141040.35EAe6rs021820>