git: 12cfa3c1bd56 - main - ifconfig: fix interface address ordering with Netlink.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 24 May 2023 15:35:01 UTC
The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=12cfa3c1bd5629a35df3a9b7b023c1a802ae771c commit 12cfa3c1bd5629a35df3a9b7b023c1a802ae771c Author: Alexander V. Chernikov <melifaro@FreeBSD.org> AuthorDate: 2023-05-24 15:34:21 +0000 Commit: Alexander V. Chernikov <melifaro@FreeBSD.org> CommitDate: 2023-05-24 15:34:21 +0000 ifconfig: fix interface address ordering with Netlink. --- sbin/ifconfig/ifconfig_netlink.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sbin/ifconfig/ifconfig_netlink.c b/sbin/ifconfig/ifconfig_netlink.c index 1df90c2963e3..140808e18681 100644 --- a/sbin/ifconfig/ifconfig_netlink.c +++ b/sbin/ifconfig/ifconfig_netlink.c @@ -124,7 +124,6 @@ nl_init_socket(struct snl_state *ss) struct ifa { struct ifa *next; - uint32_t count; uint32_t idx; struct snl_parsed_addr addr; }; @@ -214,7 +213,7 @@ prepare_ifaddrs(struct snl_state *ss, struct ifmap *ifmap) continue; struct iface *iface = ifmap->ifaces[ifindex]; ifa->next = iface->ifa; - ifa->count = ++count; + ifa->idx = ++count; iface->ifa = ifa; iface->ifa_count++; }