diff options
author | Pavel Šimerda <psimerda@redhat.com> | 2012-05-23 15:43:33 +0200 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2012-05-31 15:37:49 -0500 |
commit | 1c0e2a1ec373201b865b6c6651df865c2b5a7062 (patch) | |
tree | 635beae0f0d0dc5ccd89f31127e182af8e179f34 /src/nm-system.c | |
parent | 296e06d7647b2c434651b855e21cbaacf03be743 (diff) | |
download | NetworkManager-1c0e2a1ec373201b865b6c6651df865c2b5a7062.tar.gz |
ip6: add default gateway debugging
Diffstat (limited to 'src/nm-system.c')
-rw-r--r-- | src/nm-system.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/nm-system.c b/src/nm-system.c index b58a626bb7..b980dc5395 100644 --- a/src/nm-system.c +++ b/src/nm-system.c @@ -1156,6 +1156,16 @@ replace_default_ip6_route (int ifindex, const struct in6_addr *gw, int mss) GList *def_routes, *iter; struct rtnl_route *route; char *iface; + char gw_str[INET6_ADDRSTRLEN + 1]; + + g_return_val_if_fail (ifindex > 0, FALSE); + g_return_val_if_fail (gw != NULL, FALSE); + + if (nm_logging_level_enabled (LOGL_DEBUG)) { + memset (gw_str, 0, sizeof (gw_str)); + if (inet_ntop (AF_INET6, gw, gw_str, sizeof (gw_str) - 1)) + nm_log_dbg (LOGD_IP6, "Setting IPv6 default route via %s", gw_str); + } /* We can't just use NLM_F_REPLACE here like in the IPv4 case, because * the kernel doesn't like it if we replace the default routes it |