summaryrefslogtreecommitdiff
path: root/src/network/networkd-dhcp6.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-06-07 11:13:39 +0200
committerLennart Poettering <lennart@poettering.net>2016-06-07 11:13:39 +0200
commita849538e3bf0097595fc1fd86bcda608d1151b4c (patch)
tree20e5dbc1399719e7e24ac6997adf2428a8cdce51 /src/network/networkd-dhcp6.c
parent82e4eda664d40ef60829e27d84b1610c2f4070cd (diff)
parent1e7a0e21c97ac1bbc743009e5ec8c12bc6200e19 (diff)
Merge pull request #3394 from poettering/triple-tstamp
timestamping improvements and IPv6 RA revamp
Diffstat (limited to 'src/network/networkd-dhcp6.c')
-rw-r--r--src/network/networkd-dhcp6.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/network/networkd-dhcp6.c b/src/network/networkd-dhcp6.c
index 50721b1c74..15acf56a5f 100644
--- a/src/network/networkd-dhcp6.c
+++ b/src/network/networkd-dhcp6.c
@@ -60,10 +60,15 @@ static int dhcp6_address_handler(sd_netlink *rtnl, sd_netlink_message *m,
return 1;
}
-static int dhcp6_address_change(Link *link, struct in6_addr *ip6_addr,
- uint32_t lifetime_preferred, uint32_t lifetime_valid) {
- int r;
+static int dhcp6_address_change(
+ Link *link,
+ struct in6_addr *ip6_addr,
+ uint32_t lifetime_preferred,
+ uint32_t lifetime_valid) {
+
_cleanup_address_free_ Address *addr = NULL;
+ char buffer[INET6_ADDRSTRLEN];
+ int r;
r = address_new(&addr);
if (r < 0)
@@ -79,8 +84,8 @@ static int dhcp6_address_change(Link *link, struct in6_addr *ip6_addr,
addr->cinfo.ifa_valid = lifetime_valid;
log_link_info(link,
- "DHCPv6 address "SD_NDISC_ADDRESS_FORMAT_STR"/%d timeout preferred %d valid %d",
- SD_NDISC_ADDRESS_FORMAT_VAL(addr->in_addr.in6),
+ "DHCPv6 address %s/%d timeout preferred %d valid %d",
+ inet_ntop(AF_INET6, &addr->in_addr.in6, buffer, sizeof(buffer)),
addr->prefixlen, lifetime_preferred, lifetime_valid);
r = address_configure(addr, link, dhcp6_address_handler, true);