rdisc: print gateway for routes in rdisc debugging output

Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
Thomas Haller
2014-02-24 11:44:04 +01:00
parent 076ca1e3e2
commit 184d93ea60

View File

@@ -24,6 +24,7 @@
#include "nm-rdisc.h"
#include "nm-logging.h"
#include "nm-utils.h"
#define debug(...) nm_log_dbg (LOGD_IP6, __VA_ARGS__)
@@ -103,6 +104,7 @@ config_changed (NMRDisc *rdisc, NMRDiscConfigMap changed)
char changedstr[CONFIG_MAP_MAX_STR];
char addrstr[INET6_ADDRSTRLEN];
if (nm_logging_enabled (LOGL_DEBUG, LOGD_IP6)) {
config_map_to_string (changed, changedstr);
debug ("(%s): router discovery configuration changed [%s]:", rdisc->ifname, changedstr);
debug (" dhcp-level %s", dhcp_level_to_string (rdisc->dhcp_level));
@@ -122,7 +124,9 @@ config_changed (NMRDisc *rdisc, NMRDiscConfigMap changed)
NMRDiscRoute *route = &g_array_index (rdisc->routes, NMRDiscRoute, i);
inet_ntop (AF_INET6, &route->network, addrstr, sizeof (addrstr));
debug (" route %s/%d pref %d exp %u", addrstr, route->plen, route->preference, expiry (route));
debug (" route %s/%d via %s pref %d exp %u", addrstr, route->plen,
nm_utils_inet6_ntop (&route->gateway, NULL), route->preference,
expiry (route));
}
for (i = 0; i < rdisc->dns_servers->len; i++) {
NMRDiscDNSServer *dns_server = &g_array_index (rdisc->dns_servers, NMRDiscDNSServer, i);
@@ -136,6 +140,7 @@ config_changed (NMRDisc *rdisc, NMRDiscConfigMap changed)
debug (" dns_domain %s exp %u", dns_domain->domain, expiry (dns_domain));
}
}
}
/******************************************************************/