bugfix: for auto-deleted routes display the gw and not the interface to avoid a NULL ref
authorHannes Gredler <hannes@gredler.at>
Fri, 22 May 2009 17:51:07 +0000 (19:51 +0200)
committerHannes Gredler <hannes@gredler.at>
Fri, 22 May 2009 17:51:07 +0000 (19:51 +0200)
src/linux/kernel_routes.c

index ce6d4ad..096e0dd 100644 (file)
@@ -155,11 +155,11 @@ olsr_netlink_send(struct nlmsghdr *n, char *buf, size_t bufSize, uint8_t flag, c
                   OLSR_DEBUG(LOG_ROUTING, ". error '%s' (%d) auto-add route to %s dev %s", err_msg, errno,
                              olsr_ip_to_string(&ibuf, &nexthop->gateway), nexthop->interface->int_name);
                 else if (flag == RT_DELETE_SIMILAR_ROUTE)
-                  OLSR_DEBUG(LOG_ROUTING, ". error '%s' (%d) auto-delete route to %s dev %s", err_msg, errno,
-                             olsr_ip_to_string(&ibuf, &rt->rt_dst.prefix), nexthop->interface->int_name);
+                  OLSR_DEBUG(LOG_ROUTING, ". error '%s' (%d) auto-delete route to %s gw %s", err_msg, errno,
+                             olsr_ip_to_string(&ibuf, &rt->rt_dst.prefix), olsr_ip_to_string(&gbuf, &nexthop->gateway));
                 else if (flag == RT_DELETE_SIMILAR_AUTO_ROUTE)
-                  OLSR_DEBUG(LOG_ROUTING, ". . error '%s' (%d) auto-delete similar route to %s dev %s", err_msg, errno,
-                             olsr_ip_to_string(&ibuf, &nexthop->gateway), nexthop->interface->int_name);
+                  OLSR_DEBUG(LOG_ROUTING, ". . error '%s' (%d) auto-delete similar route to %s gw %s", err_msg, errno,
+                             olsr_ip_to_string(&ibuf, &nexthop->gateway), olsr_ip_to_string(&gbuf, &nexthop->gateway));
                 else {          /* should never happen */
                   OLSR_DEBUG(LOG_ROUTING, "# invalid internal route delete/add flag (%d) used!", flag);
                 }