diff options
author | Patrik Flykt <patrik.flykt@linux.intel.com> | 2018-08-24 09:49:22 -0600 |
---|---|---|
committer | Patrik Flykt <patrik.flykt@linux.intel.com> | 2018-08-24 09:53:46 -0600 |
commit | eb75b919e8013de2031054349fe7f778e8935f29 (patch) | |
tree | d4d66ae309e67af12bd734ac0ea972694229f8c3 /src/network | |
parent | ef5df4e5c57f0cced79dd3eac3509a2c5d9bcbe6 (diff) | |
download | systemd-eb75b919e8013de2031054349fe7f778e8935f29.tar.gz systemd-eb75b919e8013de2031054349fe7f778e8935f29.tar.bz2 systemd-eb75b919e8013de2031054349fe7f778e8935f29.zip |
networkd-dhcp6: Improve logging on DHCPv6 PD assignment
Print out prefixes assigned to links in addition to the DHCPv6
prefix it was delegated from.
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/networkd-dhcp6.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/network/networkd-dhcp6.c b/src/network/networkd-dhcp6.c index c55fe62cda..0aa7a190c4 100644 --- a/src/network/networkd-dhcp6.c +++ b/src/network/networkd-dhcp6.c @@ -121,6 +121,7 @@ static int dhcp6_pd_prefix_distribute(Link *dhcp6_link, Iterator *i, union in_addr_union prefix; uint64_t n_prefixes, n_used = 0; _cleanup_free_ char *buf = NULL; + _cleanup_free_ char *assigned_buf = NULL; int r; assert(manager); @@ -158,19 +159,23 @@ static int dhcp6_pd_prefix_distribute(Link *dhcp6_link, Iterator *i, if (assigned_link != NULL && assigned_link != link) continue; + (void) in_addr_to_string(AF_INET6, &prefix, &assigned_buf); r = dhcp6_pd_prefix_assign(link, &prefix.in6, 64, lifetime_preferred, lifetime_valid); if (r < 0) { - log_link_error_errno(link, r, "Unable to %s prefix %s/%u for link: %m", + log_link_error_errno(link, r, "Unable to %s prefix %s/64 from %s/%u for link: %m", assigned_link ? "update": "assign", + strnull(assigned_buf), strnull(buf), pd_prefix_len); if (assigned_link == NULL) continue; } else - log_link_debug(link, "Assigned prefix %" PRIu64 "/%" PRIu64 " %s/64 to link", - n_used + 1, n_prefixes, strnull(buf)); + log_link_debug(link, "Assigned prefix %" PRIu64 "/%" PRIu64 " %s/64 from %s/%u to link", + n_used + 1, n_prefixes, + strnull(assigned_buf), + strnull(buf), pd_prefix_len); n_used++; |