git: 52ff8883185a - main - ifconfig: fix ifconfig crash when compiled w/WITHOUT_NETLINK.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 14 Jun 2023 10:40:06 UTC
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? */