summaryrefslogtreecommitdiff
path: root/sysdep/linux/netlink.c
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2023-04-04 16:41:55 +0200
committerMaria Matejka <mq@ucw.cz>2023-04-04 17:00:58 +0200
commitb8a230e478d41def757344bbe1eee7fa886682e5 (patch)
tree6d6c907275ef2d61884bf3edb7f2b2ac8a6d584d /sysdep/linux/netlink.c
parenta26d307eabc9d670c8a39ade3b540cabde5851a3 (diff)
Interface subsystem locking
Diffstat (limited to 'sysdep/linux/netlink.c')
-rw-r--r--sysdep/linux/netlink.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sysdep/linux/netlink.c b/sysdep/linux/netlink.c
index 0609fde8..b18cb899 100644
--- a/sysdep/linux/netlink.c
+++ b/sysdep/linux/netlink.c
@@ -1283,8 +1283,7 @@ kif_do_scan(struct kif_proto *p UNUSED)
log(L_DEBUG "nl_scan_ifaces: Unknown packet received (type=%d)", h->nlmsg_type);
/* Re-resolve master interface for slaves */
- struct iface *i;
- WALK_LIST(i, iface_list)
+ IFACE_WALK(i)
if (i->master_index)
{
struct iface f = {
@@ -1292,13 +1291,13 @@ kif_do_scan(struct kif_proto *p UNUSED)
.mtu = i->mtu,
.index = i->index,
.master_index = i->master_index,
- .master = if_find_by_index(i->master_index)
+ .master = if_find_by_index_locked(i->master_index)
};
if (f.master != i->master)
{
memcpy(f.name, i->name, sizeof(f.name));
- if_update(&f);
+ if_update_locked(&f);
}
}