summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
Diffstat (limited to 'src/network')
-rw-r--r--src/network/networkd-address.c8
-rw-r--r--src/network/networkd-link.c16
-rw-r--r--src/network/networkd-manager.c5
-rw-r--r--src/network/networkd-netdev.c6
-rw-r--r--src/network/networkd-route.c4
5 files changed, 20 insertions, 19 deletions
diff --git a/src/network/networkd-address.c b/src/network/networkd-address.c
index 28dcf14c6e..a63773928f 100644
--- a/src/network/networkd-address.c
+++ b/src/network/networkd-address.c
@@ -105,8 +105,8 @@ int address_drop(Address *address, Link *link,
assert(link->manager);
assert(link->manager->rtnl);
- r = sd_rtnl_message_new_addr(link->manager->rtnl, RTM_DELADDR,
- link->ifindex, address->family, &req);
+ r = sd_rtnl_message_new_addr(link->manager->rtnl, &req, RTM_DELADDR,
+ link->ifindex, address->family);
if (r < 0) {
log_error("Could not allocate RTM_DELADDR message: %s",
strerror(-r));
@@ -150,8 +150,8 @@ int address_configure(Address *address, Link *link,
assert(link->manager);
assert(link->manager->rtnl);
- r = sd_rtnl_message_new_addr(link->manager->rtnl, RTM_NEWADDR,
- link->ifindex, address->family, &req);
+ r = sd_rtnl_message_new_addr(link->manager->rtnl, &req, RTM_NEWADDR,
+ link->ifindex, address->family);
if (r < 0) {
log_error("Could not allocate RTM_NEWADDR message: %s",
strerror(-r));
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index e574b2c874..e2d61ae490 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -395,11 +395,11 @@ static int set_hostname(sd_bus *bus, const char *hostname) {
r = sd_bus_message_new_method_call(
bus,
+ &m,
"org.freedesktop.hostname1",
"/org/freedesktop/hostname1",
"org.freedesktop.hostname1",
- "SetHostname",
- &m);
+ "SetHostname");
if (r < 0)
return r;
@@ -446,8 +446,8 @@ static int link_set_mtu(Link *link, uint32_t mtu) {
log_debug_link(link, "setting MTU: %" PRIu32, mtu);
- r = sd_rtnl_message_new_link(link->manager->rtnl, RTM_SETLINK,
- link->ifindex, &req);
+ r = sd_rtnl_message_new_link(link->manager->rtnl, &req,
+ RTM_SETLINK, link->ifindex);
if (r < 0) {
log_error_link(link, "Could not allocate RTM_SETLINK message");
return r;
@@ -813,8 +813,8 @@ static int link_up(Link *link) {
log_debug_link(link, "bringing link up");
- r = sd_rtnl_message_new_link(link->manager->rtnl, RTM_SETLINK,
- link->ifindex, &req);
+ r = sd_rtnl_message_new_link(link->manager->rtnl, &req,
+ RTM_SETLINK, link->ifindex);
if (r < 0) {
log_error_link(link, "Could not allocate RTM_SETLINK message");
return r;
@@ -982,8 +982,8 @@ static int link_getlink(Link *link) {
log_debug_link(link, "requesting link status");
- r = sd_rtnl_message_new_link(link->manager->rtnl, RTM_GETLINK,
- link->ifindex, &req);
+ r = sd_rtnl_message_new_link(link->manager->rtnl, &req,
+ RTM_GETLINK, link->ifindex);
if (r < 0) {
log_error_link(link, "Could not allocate RTM_GETLINK message");
return r;
diff --git a/src/network/networkd-manager.c b/src/network/networkd-manager.c
index f817d698c4..55e5cafd00 100644
--- a/src/network/networkd-manager.c
+++ b/src/network/networkd-manager.c
@@ -52,7 +52,7 @@ int manager_new(Manager **ret) {
sd_event_set_watchdog(m->event, true);
- r = sd_rtnl_open(RTMGRP_LINK | RTMGRP_IPV4_IFADDR, &m->rtnl);
+ r = sd_rtnl_open(&m->rtnl, RTMGRP_LINK | RTMGRP_IPV4_IFADDR);
if (r < 0)
return r;
@@ -252,9 +252,10 @@ int manager_udev_listen(Manager *m) {
}
r = sd_event_add_io(m->event,
+ &m->udev_event_source,
udev_monitor_get_fd(m->udev_monitor),
EPOLLIN, manager_dispatch_link_udev,
- m, &m->udev_event_source);
+ m);
if (r < 0)
return r;
diff --git a/src/network/networkd-netdev.c b/src/network/networkd-netdev.c
index 01ea8f68bc..ea6da69beb 100644
--- a/src/network/networkd-netdev.c
+++ b/src/network/networkd-netdev.c
@@ -94,8 +94,8 @@ static int netdev_enslave_ready(NetDev *netdev, Link* link, sd_rtnl_message_hand
assert(link);
assert(callback);
- r = sd_rtnl_message_new_link(netdev->manager->rtnl, RTM_SETLINK,
- link->ifindex, &req);
+ r = sd_rtnl_message_new_link(netdev->manager->rtnl, &req,
+ RTM_SETLINK, link->ifindex);
if (r < 0) {
log_error_netdev(netdev,
"Could not allocate RTM_SETLINK message: %s",
@@ -172,7 +172,7 @@ static int netdev_create(NetDev *netdev, Link *link, sd_rtnl_message_handler_t c
assert(netdev->manager);
assert(netdev->manager->rtnl);
- r = sd_rtnl_message_new_link(netdev->manager->rtnl, RTM_NEWLINK, 0, &req);
+ r = sd_rtnl_message_new_link(netdev->manager->rtnl, &req, RTM_NEWLINK, 0);
if (r < 0) {
log_error_netdev(netdev,
"Could not allocate RTM_NEWLINK message: %s",
diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c
index 5896c4a4ac..46a4537196 100644
--- a/src/network/networkd-route.c
+++ b/src/network/networkd-route.c
@@ -105,8 +105,8 @@ int route_configure(Route *route, Link *link,
assert(link->ifindex > 0);
assert(route->family == AF_INET || route->family == AF_INET6);
- r = sd_rtnl_message_new_route(link->manager->rtnl, RTM_NEWROUTE,
- route->family, &req);
+ r = sd_rtnl_message_new_route(link->manager->rtnl, &req,
+ RTM_NEWROUTE, route->family);
if (r < 0) {
log_error("Could not create RTM_NEWROUTE message: %s", strerror(-r));
return r;