mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-24 21:34:08 +03:00
networkd: netdev - add missing refs
Without this, the underlying device would get freed (and hence fail).
This commit is contained in:
parent
c081882f07
commit
e04468dec0
@ -150,6 +150,8 @@ int netdev_create_macvlan(NetDev *netdev, Link *link, sd_rtnl_message_handler_t
|
||||
return r;
|
||||
}
|
||||
|
||||
link_ref(link);
|
||||
|
||||
log_debug_netdev(netdev, "creating netdev");
|
||||
|
||||
netdev->state = NETDEV_STATE_CREATING;
|
||||
|
@ -529,6 +529,8 @@ int netdev_create_tunnel(NetDev *netdev, Link *link, sd_rtnl_message_handler_t c
|
||||
return r;
|
||||
}
|
||||
|
||||
link_ref(link);
|
||||
|
||||
log_debug_netdev(netdev, "Creating tunnel netdev: %s",
|
||||
netdev_kind_to_string(netdev->kind));
|
||||
|
||||
|
@ -139,6 +139,8 @@ int netdev_create_vlan(NetDev *netdev, Link *link, sd_rtnl_message_handler_t cal
|
||||
return r;
|
||||
}
|
||||
|
||||
link_ref(link);
|
||||
|
||||
log_debug_netdev(netdev, "creating netdev");
|
||||
|
||||
netdev->state = NETDEV_STATE_CREATING;
|
||||
|
@ -154,6 +154,8 @@ int netdev_create_vxlan(NetDev *netdev, Link *link, sd_rtnl_message_handler_t ca
|
||||
return r;
|
||||
}
|
||||
|
||||
link_ref(link);
|
||||
|
||||
log_debug_netdev(netdev, "Creating vxlan netdev: %s",
|
||||
netdev_kind_to_string(netdev->kind));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user