summaryrefslogtreecommitdiff
path: root/src/network/networkd-netdev.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-02-18 00:10:08 +0100
committerTom Gundersen <teg@jklm.no>2014-02-18 11:21:22 +0100
commit4fb7242cbbed0d865eb343548b8f0ee0fee71d85 (patch)
treeb85d087cd059d195e0796cc0cda94140067d8c49 /src/network/networkd-netdev.c
parentc0c5af00bec95567435bdfb818c69b2b669adfed (diff)
sd-rtnl-message: store reference to the bus in the message
This mimics the sd-bus api, as we may need it in the future.
Diffstat (limited to 'src/network/networkd-netdev.c')
-rw-r--r--src/network/networkd-netdev.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/network/networkd-netdev.c b/src/network/networkd-netdev.c
index 30eb77d4bc..01ea8f68bc 100644
--- a/src/network/networkd-netdev.c
+++ b/src/network/networkd-netdev.c
@@ -89,10 +89,13 @@ static int netdev_enslave_ready(NetDev *netdev, Link* link, sd_rtnl_message_hand
assert(netdev);
assert(netdev->state == NETDEV_STATE_READY);
+ assert(netdev->manager);
+ assert(netdev->manager->rtnl);
assert(link);
assert(callback);
- r = sd_rtnl_message_new_link(RTM_SETLINK, link->ifindex, &req);
+ r = sd_rtnl_message_new_link(netdev->manager->rtnl, RTM_SETLINK,
+ link->ifindex, &req);
if (r < 0) {
log_error_netdev(netdev,
"Could not allocate RTM_SETLINK message: %s",
@@ -163,12 +166,13 @@ static int netdev_create(NetDev *netdev, Link *link, sd_rtnl_message_handler_t c
int r;
assert(netdev);
- assert(!(netdev->kind == NETDEV_KIND_VLAN) || (link && callback && netdev->vlanid <= VLANID_MAX));
+ assert(!(netdev->kind == NETDEV_KIND_VLAN) ||
+ (link && callback && netdev->vlanid <= VLANID_MAX));
assert(netdev->name);
assert(netdev->manager);
assert(netdev->manager->rtnl);
- r = sd_rtnl_message_new_link(RTM_NEWLINK, 0, &req);
+ r = sd_rtnl_message_new_link(netdev->manager->rtnl, RTM_NEWLINK, 0, &req);
if (r < 0) {
log_error_netdev(netdev,
"Could not allocate RTM_NEWLINK message: %s",