diff options
| author | Michael Biebl <biebl@debian.org> | 2019-03-26 23:25:23 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2019-03-26 23:25:23 +0100 |
| commit | 9a6dcbf895f9da01768e64b73cec88c16157d91e (patch) | |
| tree | a359958930d731e9f1b59344642e10754419fe84 /src/ndisc/nm-ndisc.c | |
| parent | 964ae8cc391520440cf5aa13e2b9cc34850ea6c2 (diff) | |
New upstream version 1.16.0 upstream/1.16.0
Diffstat (limited to 'src/ndisc/nm-ndisc.c')
| -rw-r--r-- | src/ndisc/nm-ndisc.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/ndisc/nm-ndisc.c b/src/ndisc/nm-ndisc.c index 1dd8398c..dd535630 100644 --- a/src/ndisc/nm-ndisc.c +++ b/src/ndisc/nm-ndisc.c @@ -24,7 +24,6 @@ #include <stdlib.h> #include <arpa/inet.h> -#include <string.h> #include "nm-setting-ip6-config.h" @@ -442,7 +441,7 @@ nm_ndisc_add_address (NMNDisc *ndisc, if (from_ra) { /* RFC4862 5.5.3.d, we find an existing address with the same prefix. - * (note that all prefixes at this point have implicity length /64). */ + * (note that all prefixes at this point have implicitly length /64). */ if (memcmp (&item->address, &new->address, 8) == 0) { existing = item; break; @@ -965,7 +964,9 @@ nm_ndisc_dad_failed (NMNDisc *ndisc, const struct in6_addr *address, gboolean em NMNDiscAddress *item = &g_array_index (rdata->addresses, NMNDiscAddress, i); if (IN6_ARE_ADDR_EQUAL (&item->address, address)) { - _LOGD ("DAD failed for discovered address %s", nm_utils_inet6_ntop (address, NULL)); + char sbuf[NM_UTILS_INET_ADDRSTRLEN]; + + _LOGD ("DAD failed for discovered address %s", nm_utils_inet6_ntop (address, sbuf)); changed = TRUE; if (!complete_address (ndisc, item)) { g_array_remove_index (rdata->addresses, i); @@ -1056,10 +1057,11 @@ _config_changed_log (NMNDisc *ndisc, NMNDiscConfigMap changed) } for (i = 0; i < rdata->routes->len; i++) { NMNDiscRoute *route = &g_array_index (rdata->routes, NMNDiscRoute, i); + char sbuf[NM_UTILS_INET_ADDRSTRLEN]; inet_ntop (AF_INET6, &route->network, addrstr, sizeof (addrstr)); _LOGD (" route %s/%u via %s pref %s exp %s", addrstr, (guint) route->plen, - nm_utils_inet6_ntop (&route->gateway, NULL), + nm_utils_inet6_ntop (&route->gateway, sbuf), nm_icmpv6_router_pref_to_string (route->preference, str_pref, sizeof (str_pref)), get_exp (str_exp, now_ns, route)); } |