summaryrefslogtreecommitdiffstats
path: root/src/network/netdev/geneve.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2018-11-28 21:06:52 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2018-12-02 06:29:32 +0100
commit302a796f5a9d64f844698eb90ff4227ba7cc0457 (patch)
tree0a0d9b3245c8b07137f65f97c723d61025d3bc2a /src/network/netdev/geneve.c
parentnetwork: rename ndisc_route_handler() to ndisc_netlink_message_handler() (diff)
downloadsystemd-302a796f5a9d64f844698eb90ff4227ba7cc0457.tar.xz
systemd-302a796f5a9d64f844698eb90ff4227ba7cc0457.zip
network: use typesafe netlink_call_async() macro where applicable
Diffstat (limited to 'src/network/netdev/geneve.c')
-rw-r--r--src/network/netdev/geneve.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/network/netdev/geneve.c b/src/network/netdev/geneve.c
index 1742e399b8..089bbfea22 100644
--- a/src/network/netdev/geneve.c
+++ b/src/network/netdev/geneve.c
@@ -2,12 +2,14 @@
#include <net/if.h>
+#include "sd-netlink.h"
+
#include "alloc-util.h"
#include "conf-parser.h"
#include "extract-word.h"
#include "geneve.h"
+#include "netlink-util.h"
#include "parse-util.h"
-#include "sd-netlink.h"
#include "string-util.h"
#include "strv.h"
#include "missing.h"
@@ -17,8 +19,7 @@
#define DEFAULT_GENEVE_DESTINATION_PORT 6081
/* callback for geneve netdev's created without a backing Link */
-static int geneve_netdev_create_handler(sd_netlink *rtnl, sd_netlink_message *m, void *userdata) {
- NetDev *netdev = userdata;
+static int geneve_netdev_create_handler(sd_netlink *rtnl, sd_netlink_message *m, NetDev *netdev) {
int r;
assert(netdev);
@@ -136,8 +137,8 @@ static int netdev_geneve_create(NetDev *netdev) {
if (r < 0)
return log_netdev_error_errno(netdev, r, "Could not append IFLA_LINKINFO attribute: %m");
- r = sd_netlink_call_async(netdev->manager->rtnl, NULL, m, geneve_netdev_create_handler,
- netdev_destroy_callback, netdev, 0, __func__);
+ r = netlink_call_async(netdev->manager->rtnl, NULL, m, geneve_netdev_create_handler,
+ netdev_destroy_callback, netdev);
if (r < 0)
return log_netdev_error_errno(netdev, r, "Could not send rtnetlink message: %m");