diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-01-14 00:30:37 +0900 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-01-15 14:48:53 +0100 |
commit | 9e2bbf9915255770836d16cd99eeb6536297079d (patch) | |
tree | 9433c4c5187678f0229e88a077fc5fd03ff7e8dd /src/network/netdev/netdev.h | |
parent | 50198038c89ae5ed5f8ea1288b61e4ab44cb3cdf (diff) | |
download | systemd-9e2bbf9915255770836d16cd99eeb6536297079d.tar.gz |
network: make Link and NetDev always have the valid poiter to Manager
c4397d94c3d94909188d82e086ebedf5d3690569 introduces
link_detach_from_manager() and netdev_detach_from_manager(), and they
set Link::manager or NetDev::manager NULL.
But, at the time e.g. link is removed, hence link_drop() is called,
there may be still some asynchronous netlink call is waiting, and
their callbacks hit assertion.
This make {link,netdev}_detach_from_manager() just drop all references
from manager, but keep the pointer to manager.
Fixes #11411.
Diffstat (limited to 'src/network/netdev/netdev.h')
-rw-r--r-- | src/network/netdev/netdev.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/network/netdev/netdev.h b/src/network/netdev/netdev.h index bfe1094181..d6524da0f3 100644 --- a/src/network/netdev/netdev.h +++ b/src/network/netdev/netdev.h @@ -156,6 +156,7 @@ NetDev *netdev_ref(NetDev *netdev); DEFINE_TRIVIAL_DESTRUCTOR(netdev_destroy_callback, NetDev, netdev_unref); DEFINE_TRIVIAL_CLEANUP_FUNC(NetDev*, netdev_unref); +bool netdev_is_managed(NetDev *netdev); int netdev_get(Manager *manager, const char *name, NetDev **ret); int netdev_set_ifindex(NetDev *netdev, sd_netlink_message *newlink); int netdev_get_mac(const char *ifname, struct ether_addr **ret); |