network: use '_handler' suffix for netlink callbacks

This commit is contained in:
Yu Watanabe 2018-10-10 14:38:57 +09:00
parent c6de4729b1
commit c8ee637e7f
2 changed files with 8 additions and 12 deletions

View 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),

View 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;