summaryrefslogtreecommitdiffstats
path: root/src/network/networkd-dhcp6.c
diff options
context:
space:
mode:
authorPatrik Flykt <patrik.flykt@linux.intel.com>2018-08-24 17:49:20 +0200
committerPatrik Flykt <patrik.flykt@linux.intel.com>2018-08-24 17:53:46 +0200
commitef5df4e5c57f0cced79dd3eac3509a2c5d9bcbe6 (patch)
treeb13fdd7515829020fac068a3c9059e85f10c1536 /src/network/networkd-dhcp6.c
parentnetworkd-dhcp6: Fix PD prefix length for subnet assignment (diff)
downloadsystemd-ef5df4e5c57f0cced79dd3eac3509a2c5d9bcbe6.tar.xz
systemd-ef5df4e5c57f0cced79dd3eac3509a2c5d9bcbe6.zip
networkd-dhcp6: Fix logging of DHCPv6 prefix
Pretty-print log messages with DHCPv6 prefixes after the prefixes have been set instead of some random unassigned stack values.
Diffstat (limited to 'src/network/networkd-dhcp6.c')
-rw-r--r--src/network/networkd-dhcp6.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/networkd-dhcp6.c b/src/network/networkd-dhcp6.c
index 5a23330732..c55fe62cda 100644
--- a/src/network/networkd-dhcp6.c
+++ b/src/network/networkd-dhcp6.c
@@ -221,8 +221,6 @@ static int dhcp6_lease_pd_prefix_acquired(sd_dhcp6_client *client, Link *link) {
if (r < 0)
return r;
- (void) in_addr_to_string(AF_INET6, (union in_addr_union*) &pd_prefix, &buf);
-
dhcp6_reset_pd_prefix_network(link);
sd_dhcp6_lease_reset_pd_prefix_iter(lease);
@@ -231,12 +229,14 @@ static int dhcp6_lease_pd_prefix_acquired(sd_dhcp6_client *client, Link *link) {
&lifetime_valid) >= 0) {
if (pd_prefix_len > 64) {
+ (void) in_addr_to_string(AF_INET6, (union in_addr_union*) &pd_prefix, &buf);
log_link_debug(link, "PD Prefix length > 64, ignoring prefix %s/%u",
strnull(buf), pd_prefix_len);
continue;
}
if (pd_prefix_len < 48) {
+ (void) in_addr_to_string(AF_INET6, (union in_addr_union*) &pd_prefix, &buf);
log_link_warning(link, "PD Prefix length < 48, looks unusual %s/%u",
strnull(buf), pd_prefix_len);
}