]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: use '_handler' suffix for netlink callbacks
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 10 Oct 2018 05:38:57 +0000 (14:38 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 10 Oct 2018 05:43:05 +0000 (14:43 +0900)
src/network/networkd-dhcp6.c
src/network/networkd-manager.c

index 7071adc0bb452c5a3c700ba0bb29c769e15d1aad..8e21b58875c1b4079208b4247f0c0d078d7f92ef 100644 (file)
@@ -100,8 +100,7 @@ static int dhcp6_pd_prefix_assign(Link *link, struct in6_addr *prefix,
         return sd_radv_start(radv);
 }
 
-static int dhcp6_route_remove_cb(sd_netlink *nl, sd_netlink_message *m,
-                                 void *userdata) {
+static int dhcp6_route_remove_handler(sd_netlink *nl, sd_netlink_message *m, void *userdata) {
         Link *link = userdata;
         int r;
 
@@ -152,7 +151,7 @@ int dhcp6_lease_pd_prefix_lost(sd_dhcp6_client *client, Link* link) {
                         route_update(route, NULL, 0, NULL, NULL, 0, 0,
                                      RTN_UNREACHABLE);
 
-                        r = route_remove(route, link, dhcp6_route_remove_cb);
+                        r = route_remove(route, link, dhcp6_route_remove_handler);
                         if (r < 0) {
                                 (void) in_addr_to_string(AF_INET6,
                                                          &pd_prefix, &buf);
@@ -248,8 +247,7 @@ static int dhcp6_pd_prefix_distribute(Link *dhcp6_link, Iterator *i,
         return 0;
 }
 
-static int dhcp6_route_add_cb(sd_netlink *nl, sd_netlink_message *m,
-                              void *userdata) {
+static int dhcp6_route_handler(sd_netlink *nl, sd_netlink_message *m, void *userdata) {
         Link *link = userdata;
         int r;
 
@@ -313,7 +311,7 @@ static int dhcp6_lease_pd_prefix_acquired(sd_dhcp6_client *client, Link *link) {
                         route_update(route, NULL, 0, NULL, NULL, 0, 0,
                                      RTN_UNREACHABLE);
 
-                        r = route_configure(route, link, dhcp6_route_add_cb);
+                        r = route_configure(route, link, dhcp6_route_handler);
                         if (r < 0) {
                                 log_link_warning_errno(link, r, "Cannot configure unreachable route for delegated subnet %s/%u: %m",
                                                        strnull(buf),
index 8dcf6765c9d241e224aa78e943af3cc9f7003640..8d0f4638bc1e92c8727632f6ca00e75ebf966f63 100644 (file)
@@ -1239,8 +1239,7 @@ Link *manager_dhcp6_prefix_get(Manager *m, struct in6_addr *addr) {
         return hashmap_get(m->dhcp6_prefixes, addr);
 }
 
-static int dhcp6_route_add_callback(sd_netlink *nl, sd_netlink_message *m,
-                                  void *userdata) {
+static int dhcp6_route_add_handler(sd_netlink *nl, sd_netlink_message *m, void *userdata) {
         Link *link = userdata;
         int r;
 
@@ -1267,7 +1266,7 @@ int manager_dhcp6_prefix_add(Manager *m, struct in6_addr *addr, Link *link) {
         if (r < 0)
                 return r;
 
-        r = route_configure(route, link, dhcp6_route_add_callback);
+        r = route_configure(route, link, dhcp6_route_add_handler);
         if (r < 0)
                 return r;
 
@@ -1277,8 +1276,7 @@ int manager_dhcp6_prefix_add(Manager *m, struct in6_addr *addr, Link *link) {
         return hashmap_put(m->dhcp6_prefixes, addr, link);
 }
 
-static int dhcp6_route_remove_callback(sd_netlink *nl, sd_netlink_message *m,
-                                       void *userdata) {
+static int dhcp6_route_remove_handler(sd_netlink *nl, sd_netlink_message *m, void *userdata) {
         Link *link = userdata;
         int r;
 
@@ -1311,7 +1309,7 @@ static int manager_dhcp6_prefix_remove(Manager *m, struct in6_addr *addr) {
         if (r < 0)
                 return r;
 
-        r = route_remove(route, l, dhcp6_route_remove_callback);
+        r = route_remove(route, l, dhcp6_route_remove_handler);
         if (r < 0)
                 return r;