chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
path-util: fix path_is_mount_point() for symlinks
[elogind.git]
/
src
/
network
/
networkd-ipv4ll.c
diff --git
a/src/network/networkd-ipv4ll.c
b/src/network/networkd-ipv4ll.c
index 5467bc372e3455e07cf108bd6b40326b86e1efd4..8050801e1959d69cedf0638721d79ed44d744b51 100644
(file)
--- a/
src/network/networkd-ipv4ll.c
+++ b/
src/network/networkd-ipv4ll.c
@@
-40,12
+40,11
@@
static int ipv4ll_address_lost(Link *link) {
if (r < 0)
return 0;
if (r < 0)
return 0;
- log_debug_link(link, "IPv4 link-local release %u.%u.%u.%u",
- ADDRESS_FMT_VAL(addr));
+ log_link_debug(link, "IPv4 link-local release %u.%u.%u.%u", ADDRESS_FMT_VAL(addr));
r = address_new_dynamic(&address);
if (r < 0) {
r = address_new_dynamic(&address);
if (r < 0) {
- log_
error_link
(link, "Could not allocate address: %s", strerror(-r));
+ log_
link_error
(link, "Could not allocate address: %s", strerror(-r));
return r;
}
return r;
}
@@
-58,7
+57,7
@@
static int ipv4ll_address_lost(Link *link) {
r = route_new_dynamic(&route, RTPROT_UNSPEC);
if (r < 0) {
r = route_new_dynamic(&route, RTPROT_UNSPEC);
if (r < 0) {
- log_
error_link
(link, "Could not allocate route: %s",
+ log_
link_error
(link, "Could not allocate route: %s",
strerror(-r));
return r;
}
strerror(-r));
return r;
}
@@
-83,7
+82,7
@@
static int ipv4ll_route_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdat
r = sd_rtnl_message_get_errno(m);
if (r < 0 && r != -EEXIST) {
r = sd_rtnl_message_get_errno(m);
if (r < 0 && r != -EEXIST) {
- log_
error_link
(link, "could not set ipv4ll route: %s", strerror(-r));
+ log_
link_error
(link, "could not set ipv4ll route: %s", strerror(-r));
link_enter_failed(link);
}
link_enter_failed(link);
}
@@
-104,13
+103,10
@@
static int ipv4ll_address_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userd
r = sd_rtnl_message_get_errno(m);
if (r < 0 && r != -EEXIST) {
r = sd_rtnl_message_get_errno(m);
if (r < 0 && r != -EEXIST) {
- log_
error_link
(link, "could not set ipv4ll address: %s", strerror(-r));
+ log_
link_error
(link, "could not set ipv4ll address: %s", strerror(-r));
link_enter_failed(link);
link_enter_failed(link);
- } else if (r >= 0) {
- /* calling handler directly so take a ref */
- link_ref(link);
- link_get_address_handler(rtnl, m, link);
- }
+ } else if (r >= 0)
+ link_rtnl_process_address(rtnl, m, link->manager);
link->ipv4ll_address = true;
link->ipv4ll_address = true;
@@
-135,7
+131,7
@@
static int ipv4ll_address_claimed(sd_ipv4ll *ll, Link *link) {
else if (r < 0)
return r;
else if (r < 0)
return r;
- log_
debug_link
(link, "IPv4 link-local claim %u.%u.%u.%u",
+ log_
link_debug
(link, "IPv4 link-local claim %u.%u.%u.%u",
ADDRESS_FMT_VAL(address));
r = address_new_dynamic(&ll_addr);
ADDRESS_FMT_VAL(address));
r = address_new_dynamic(&ll_addr);
@@
-200,9
+196,9
@@
static void ipv4ll_handler(sd_ipv4ll *ll, int event, void *userdata){
break;
default:
if (event < 0)
break;
default:
if (event < 0)
- log_
warning_link
(link, "IPv4 link-local error: %s", strerror(-event));
+ log_
link_warning
(link, "IPv4 link-local error: %s", strerror(-event));
else
else
- log_
warning_link
(link, "IPv4 link-local unknown event: %d", event);
+ log_
link_warning
(link, "IPv4 link-local unknown event: %d", event);
break;
}
}
break;
}
}
@@
-213,7
+209,7
@@
int ipv4ll_configure(Link *link) {
assert(link);
assert(link->network);
assert(link);
assert(link->network);
- assert(
link->network->ipv4ll
);
+ assert(
IN_SET(link->network->link_local, ADDRESS_FAMILY_IPV4, ADDRESS_FAMILY_YES)
);
r = sd_ipv4ll_new(&link->ipv4ll);
if (r < 0)
r = sd_ipv4ll_new(&link->ipv4ll);
if (r < 0)