ifconfig: fix interface address ordering with Netlink.

This commit is contained in:
Alexander V. Chernikov 2023-05-24 15:34:21 +00:00
parent 1186ef86c3
commit 12cfa3c1bd

View File

@ -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++;
}