diff options
Diffstat (limited to 'src/libsystemd/sd-rtnl/test-rtnl.c')
-rw-r--r-- | src/libsystemd/sd-rtnl/test-rtnl.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/libsystemd/sd-rtnl/test-rtnl.c b/src/libsystemd/sd-rtnl/test-rtnl.c index 21e12f65e3..7bbc4486f2 100644 --- a/src/libsystemd/sd-rtnl/test-rtnl.c +++ b/src/libsystemd/sd-rtnl/test-rtnl.c @@ -36,7 +36,7 @@ static void test_link_configure(sd_rtnl *rtnl, int ifindex) { void *data; /* we'd really like to test NEWLINK, but let's not mess with the running kernel */ - assert(sd_rtnl_message_new_link(RTM_GETLINK, ifindex, &message) >= 0); + assert(sd_rtnl_message_new_link(rtnl, RTM_GETLINK, ifindex, &message) >= 0); assert(sd_rtnl_message_append_string(message, IFLA_IFNAME, name) >= 0); assert(sd_rtnl_message_append_ether_addr(message, IFLA_ADDRESS, ether_aton(mac)) >= 0); assert(sd_rtnl_message_append_u32(message, IFLA_MTU, mtu) >= 0); @@ -65,7 +65,7 @@ static void test_link_get(sd_rtnl *rtnl, int ifindex) { void *data; uint16_t type; - assert(sd_rtnl_message_new_link(RTM_GETLINK, ifindex, &m) >= 0); + assert(sd_rtnl_message_new_link(rtnl, RTM_GETLINK, ifindex, &m) >= 0); assert(m); /* u8 test cases */ @@ -136,7 +136,7 @@ static void test_route(void) { void *data; int r; - r = sd_rtnl_message_new_route(RTM_NEWROUTE, AF_INET, &req); + r = sd_rtnl_message_new_route(NULL, RTM_NEWROUTE, AF_INET, &req); if (r < 0) { log_error("Could not create RTM_NEWROUTE message: %s", strerror(-r)); return; @@ -215,7 +215,7 @@ static void test_event_loop(int ifindex) { assert(ifname); assert(sd_rtnl_open(0, &rtnl) >= 0); - assert(sd_rtnl_message_new_link(RTM_GETLINK, ifindex, &m) >= 0); + assert(sd_rtnl_message_new_link(rtnl, RTM_GETLINK, ifindex, &m) >= 0); assert(sd_rtnl_call_async(rtnl, m, &link_handler, ifname, 0, NULL) >= 0); @@ -249,7 +249,7 @@ static void test_async(int ifindex) { assert(sd_rtnl_open(0, &rtnl) >= 0); - assert(sd_rtnl_message_new_link(RTM_GETLINK, ifindex, &m) >= 0); + assert(sd_rtnl_message_new_link(rtnl, RTM_GETLINK, ifindex, &m) >= 0); assert(sd_rtnl_call_async(rtnl, m, &link_handler, ifname, 0, &serial) >= 0); @@ -264,8 +264,8 @@ static void test_pipe(int ifindex) { assert(sd_rtnl_open(0, &rtnl) >= 0); - assert(sd_rtnl_message_new_link(RTM_GETLINK, ifindex, &m1) >= 0); - assert(sd_rtnl_message_new_link(RTM_GETLINK, ifindex, &m2) >= 0); + assert(sd_rtnl_message_new_link(rtnl, RTM_GETLINK, ifindex, &m1) >= 0); + assert(sd_rtnl_message_new_link(rtnl, RTM_GETLINK, ifindex, &m2) >= 0); counter ++; assert(sd_rtnl_call_async(rtnl, m1, &pipe_handler, &counter, 0, NULL) >= 0); @@ -284,7 +284,7 @@ static void test_container(void) { uint16_t type; void *data; - assert(sd_rtnl_message_new_link(RTM_NEWLINK, 0, &m) >= 0); + assert(sd_rtnl_message_new_link(NULL, RTM_NEWLINK, 0, &m) >= 0); assert(sd_rtnl_message_open_container(m, IFLA_LINKINFO) >= 0); assert(sd_rtnl_message_open_container(m, IFLA_LINKINFO) == -ENOTSUP); @@ -364,7 +364,7 @@ int main(void) { test_link_configure(rtnl, if_loopback); - assert(sd_rtnl_message_new_link(RTM_GETLINK, if_loopback, &m) >= 0); + assert(sd_rtnl_message_new_link(rtnl, RTM_GETLINK, if_loopback, &m) >= 0); assert(m); assert(sd_rtnl_message_get_type(m, &type) >= 0); |