From 61e8dfc660785376433ecf015b44daff5c99ee9d Mon Sep 17 00:00:00 2001 From: david Date: Wed, 30 Mar 2011 20:53:30 +0000 Subject: [PATCH] Improve the message "WARNING: Unable to find appropriate interface for system route to..." to include the destination and netmask, not only the gateway. --- libnetutil/netutil.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libnetutil/netutil.cc b/libnetutil/netutil.cc index 90f7bc5c6..736dfd0fc 100644 --- a/libnetutil/netutil.cc +++ b/libnetutil/netutil.cc @@ -1517,7 +1517,11 @@ static struct dnet_collector_route_nfo *sysroutes_dnet_find_interfaces(struct dn i = 0; while (i < dcrn->numroutes) { if (dcrn->routes[i].device == NULL) { - netutil_error("WARNING: Unable to find appropriate interface for system route to %s", inet_ntoa(dcrn->routes[i].gw)); + struct in_addr ia; + + ia.s_addr = dcrn->routes[i].dest; + netutil_error("WARNING: Unable to find appropriate interface for system route to %s/%u gw %s", + inet_ntoa(ia), dcrn->routes[i].netmask, inet_ntoa(dcrn->routes[i].gw)); /* Remove this entry from the table. */ memmove(dcrn->routes + i, dcrn->routes + i + 1, sizeof(dcrn->routes[0]) * (dcrn->numroutes - i - 1)); dcrn->numroutes--;