diff options
author | Tom Gundersen <teg@jklm.no> | 2014-06-29 16:34:43 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2014-06-29 16:34:43 +0200 |
commit | b16665806a448186f432b47e944f1682284a0182 (patch) | |
tree | ee5e40b1a30449ea6144db4093b5becd3587e90e | |
parent | 1f87d09e984ce34f29a63e4d50ad6ffc3701e078 (diff) |
networkd: improve DHCP error logging
-rw-r--r-- | src/network/networkd-link.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index 4c75fa3d38..dff445bc59 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -413,7 +413,7 @@ static int link_set_dhcp_routes(Link *link) { r = sd_dhcp_lease_get_routes(link->dhcp_lease, &static_routes, &static_routes_size); if (r < 0) { if (r != -ENOENT) - log_warning_link(link, "DHCP error: %s", strerror(-r)); + log_warning_link(link, "DHCP error: could not get routes: %s", strerror(-r)); return r; } @@ -519,7 +519,8 @@ static int link_enter_set_routes(Link *link) { r = sd_dhcp_lease_get_router(link->dhcp_lease, &gateway); if (r < 0 && r != -ENOENT) { - log_warning_link(link, "DHCP error: %s", strerror(-r)); + log_warning_link(link, "DHCP error: could not get gateway: %s", + strerror(-r)); return r; } @@ -1109,7 +1110,8 @@ static int dhcp_lease_acquired(sd_dhcp_client *client, Link *link) { r = sd_dhcp_lease_get_router(lease, &gateway); if (r < 0 && r != -ENOENT) { - log_warning_link(link, "DHCP error: %s", strerror(-r)); + log_warning_link(link, "DHCP error: could not get gateway: %s", + strerror(-r)); return r; } @@ -1250,7 +1252,7 @@ static void dhcp_handler(sd_dhcp_client *client, int event, void *userdata) { break; default: if (event < 0) - log_warning_link(link, "DHCP error: %s", strerror(-event)); + log_warning_link(link, "DHCP error: client failed: %s", strerror(-event)); else log_warning_link(link, "DHCP unknown event: %d", event); break; |