* *.c: Change level of debug messages to LOG_DEBUG.
+2004-12-07 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
+ * *.c: Change level of debug messages to LOG_DEBUG.
+
2004-12-07 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* main.c: (main) The 2nd argument to openzlog has been removed.
if_addr_wakeup (ifp);
if (IS_ZEBRA_DEBUG_KERNEL)
- zlog_info ("interface %s index %d becomes active.",
- ifp->name, ifp->ifindex);
+ zlog_debug ("interface %s index %d becomes active.",
+ ifp->name, ifp->ifindex);
}
else
{
if (IS_ZEBRA_DEBUG_KERNEL)
- zlog_info ("interface %s index %d is added.", ifp->name, ifp->ifindex);
+ zlog_debug ("interface %s index %d is added.", ifp->name, ifp->ifindex);
}
}
UNSET_FLAG (ifp->status, ZEBRA_INTERFACE_ACTIVE);
if (IS_ZEBRA_DEBUG_KERNEL)
- zlog_info ("interface %s index %d is now inactive.",
+ zlog_debug ("interface %s index %d is now inactive.",
ifp->name, ifp->ifindex);
/* Delete connected routes from the kernel. */
}
if(irdp->flags & IF_DEBUG_MISC )
- zlog_warn("IRDP: Adding group %s for %s\n",
- inet_2a(htonl(INADDR_ALLRTRS_GROUP), b1),
- ifp->name);
+ zlog_debug("IRDP: Adding group %s for %s\n",
+ inet_2a(htonl(INADDR_ALLRTRS_GROUP), b1),
+ ifp->name);
return 0;
}
int if_drop_group (struct interface *ifp)
return ret;
if(irdp->flags & IF_DEBUG_MISC)
- zlog_warn("IRDP: Leaving group %s for %s\n",
- inet_2a(htonl(INADDR_ALLRTRS_GROUP), b1),
- ifp->name);
+ zlog_debug("IRDP: Leaving group %s for %s\n",
+ inet_2a(htonl(INADDR_ALLRTRS_GROUP), b1),
+ ifp->name);
return 0;
}
if(irdp->flags & IF_DEBUG_MISC)
- zlog_warn("IRDP: Init timer for %s set to %u\n",
- ifp->name,
- timer);
+ zlog_debug("IRDP: Init timer for %s set to %u\n",
+ ifp->name,
+ timer);
irdp->t_advertise = thread_add_timer(zebrad.master,
irdp_send_thread,
dst = htonl(INADDR_ALLHOSTS_GROUP);
if(irdp->flags & IF_DEBUG_MESSAGES)
- zlog_warn("IRDP: TX Advert on %s %s/%d Holdtime=%d Preference=%d",
+ zlog_debug("IRDP: TX Advert on %s %s/%d Holdtime=%d Preference=%d",
ifp->name,
inet_ntoa(p->u.prefix4),
p->prefixlen,
timer= MAX_INITIAL_ADVERT_INTERVAL;
if(irdp->flags & IF_DEBUG_MISC)
- zlog_warn("IRDP: New timer for %s set to %u\n", ifp->name, timer);
+ zlog_debug("IRDP: New timer for %s set to %u\n", ifp->name, timer);
irdp->t_advertise = thread_add_timer(zebrad.master, irdp_send_thread, ifp, timer);
return 0;
case ICMP_ROUTERSOLICIT:
if(irdp->flags & IF_DEBUG_MESSAGES)
- zlog_warn ("IRDP: RX Solicit on %s from %s\n",
- ifp->name,
- inet_ntoa (src));
+ zlog_debug ("IRDP: RX Solicit on %s from %s\n",
+ ifp->name,
+ inet_ntoa (src));
process_solicit(ifp);
break;
if(! (irdp->flags & IF_ACTIVE)) {
if(irdp->flags & IF_DEBUG_MISC)
- zlog_warn("IRDP: RX ICMP for disabled interface %s\n",
- ifp->name);
+ zlog_debug("IRDP: RX ICMP for disabled interface %s\n", ifp->name);
return 0;
}
if(irdp->flags & IF_DEBUG_PACKET) {
int i;
- zlog_warn("IRDP: RX (idx %d) ", ifindex);
- for(i=0; i < ret; i++) zlog_warn( "IRDP: RX %x ", buf[i]&0xFF);
+ zlog_debug("IRDP: RX (idx %d) ", ifindex);
+ for(i=0; i < ret; i++) zlog_debug( "IRDP: RX %x ", buf[i]&0xFF);
}
parse_irdp_packet(buf, ret, ifp);
}
\f
/* Dump routing table flag for debug purpose. */
-void
+static void
rtm_flag_dump (int flag)
{
struct message *mes;
strlcat (buf, " ", BUFSIZ);
}
}
- zlog_info ("Kernel: %s", buf);
+ zlog_debug ("Kernel: %s", buf);
}
#ifdef RTM_IFANNOUNCE
if_get_metric (ifp);
if (IS_ZEBRA_DEBUG_KERNEL)
- zlog_info ("interface %s index %d", ifp->name, ifp->ifindex);
+ zlog_debug ("interface %s index %d", ifp->name, ifp->ifindex);
return 0;
}
#endif /* HAVE_NET_RT_IFLIST */
if (IS_ZEBRA_DEBUG_KERNEL)
- zlog_info ("interface %s index %d", ifp->name, ifp->ifindex);
+ zlog_debug ("interface %s index %d", ifp->name, ifp->ifindex);
return 0;
}
#include "zebra/zserv.h"
/* For debug purpose. */
-void
+static void
rtmsg_debug (struct rt_msghdr *rtm)
{
char *type = "Unknown";
break;
}
- zlog_info ("Kernel: Len: %d Type: %s", rtm->rtm_msglen, type);
+ zlog_debug ("Kernel: Len: %d Type: %s", rtm->rtm_msglen, type);
rtm_flag_dump (rtm->rtm_flags);
- zlog_info ("Kernel: message seq %d", rtm->rtm_seq);
- zlog_info ("Kernel: pid %d", rtm->rtm_pid);
+ zlog_debug ("Kernel: message seq %d", rtm->rtm_seq);
+ zlog_debug ("Kernel: pid %d", rtm->rtm_pid);
}
/* This is pretty gross, better suggestions welcome -- mhandler */
#endif /* RTM_IFANNOUNCE */
default:
if (IS_ZEBRA_DEBUG_KERNEL)
- zlog_info("Unprocessed RTM_type: %d", rtm->rtm_type);
+ zlog_debug("Unprocessed RTM_type: %d", rtm->rtm_type);
break;
}
return 0;
struct zserv *client;
if (IS_ZEBRA_DEBUG_EVENT)
- zlog_info ("MESSAGE: ZEBRA_INTERFACE_UP %s", ifp->name);
+ zlog_debug ("MESSAGE: ZEBRA_INTERFACE_UP %s", ifp->name);
for (node = listhead (zebrad.client_list); node; nextnode (node))
if ((client = getdata (node)) != NULL)
struct zserv *client;
if (IS_ZEBRA_DEBUG_EVENT)
- zlog_info ("MESSAGE: ZEBRA_INTERFACE_DOWN %s", ifp->name);
+ zlog_debug ("MESSAGE: ZEBRA_INTERFACE_DOWN %s", ifp->name);
for (node = listhead (zebrad.client_list); node; nextnode (node))
if ((client = getdata (node)) != NULL)
struct zserv *client;
if (IS_ZEBRA_DEBUG_EVENT)
- zlog_info ("MESSAGE: ZEBRA_INTERFACE_ADD %s", ifp->name);
+ zlog_debug ("MESSAGE: ZEBRA_INTERFACE_ADD %s", ifp->name);
for (node = listhead (zebrad.client_list); node; nextnode (node))
if ((client = getdata (node)) != NULL)
struct zserv *client;
if (IS_ZEBRA_DEBUG_EVENT)
- zlog_info ("MESSAGE: ZEBRA_INTERFACE_DELETE %s", ifp->name);
+ zlog_debug ("MESSAGE: ZEBRA_INTERFACE_DELETE %s", ifp->name);
for (node = listhead (zebrad.client_list); node; nextnode (node))
if ((client = getdata (node)) != NULL)
if (IS_ZEBRA_DEBUG_EVENT)
{
p = ifc->address;
- zlog_info ("MESSAGE: ZEBRA_INTERFACE_ADDRESS_ADD %s/%d on %s",
- inet_ntop (p->family, &p->u.prefix, buf, BUFSIZ),
- p->prefixlen, ifc->ifp->name);
+ zlog_debug ("MESSAGE: ZEBRA_INTERFACE_ADDRESS_ADD %s/%d on %s",
+ inet_ntop (p->family, &p->u.prefix, buf, BUFSIZ),
+ p->prefixlen, ifc->ifp->name);
}
router_id_add_address(ifc);
if (IS_ZEBRA_DEBUG_EVENT)
{
p = ifc->address;
- zlog_info ("MESSAGE: ZEBRA_INTERFACE_ADDRESS_DELETE %s/%d on %s",
- inet_ntop (p->family, &p->u.prefix, buf, BUFSIZ),
+ zlog_debug ("MESSAGE: ZEBRA_INTERFACE_ADDRESS_DELETE %s/%d on %s",
+ inet_ntop (p->family, &p->u.prefix, buf, BUFSIZ),
p->prefixlen, ifc->ifp->name);
}
if (nexthop_num == 0)
{
if (IS_ZEBRA_DEBUG_KERNEL)
- zlog_info ("netlink_route_multipath(): No useful nexthop.");
+ zlog_debug ("netlink_route_multipath(): No useful nexthop.");
return 0;
}
if (nexthop_num == 0)
{
if (IS_ZEBRA_DEBUG_KERNEL)
- zlog_info ("netlink_route_multipath(): No useful nexthop.");
+ zlog_debug ("netlink_route_multipath(): No useful nexthop.");
return 0;
}
{
if (IS_ZEBRA_DEBUG_KERNEL)
{
- zlog_info ("%s: %s ACK: type=%s(%u), seq=%u, pid=%d",
+ zlog_debug ("%s: %s ACK: type=%s(%u), seq=%u, pid=%d",
__FUNCTION__, nl->name,
lookup (nlmsg_str, err->msg.nlmsg_type),
err->msg.nlmsg_type, err->msg.nlmsg_seq,
/* OK we got netlink message. */
if (IS_ZEBRA_DEBUG_KERNEL)
- zlog_info ("netlink_parse_info: %s type %s(%u), seq=%u, pid=%d",
+ zlog_debug ("netlink_parse_info: %s type %s(%u), seq=%u, pid=%d",
nl->name,
lookup (nlmsg_str, h->nlmsg_type), h->nlmsg_type,
h->nlmsg_seq, h->nlmsg_pid);
if (nl != &netlink_cmd && h->nlmsg_pid == netlink_cmd.snl.nl_pid)
{
if (IS_ZEBRA_DEBUG_KERNEL)
- zlog_info ("netlink_parse_info: %s packet comes from %s",
+ zlog_debug ("netlink_parse_info: %s packet comes from %s",
nl->name, netlink_cmd.name);
continue;
}
if (IS_ZEBRA_DEBUG_KERNEL) /* remove this line to see initial ifcfg */
{
char buf[BUFSIZ];
- zlog_info ("netlink_interface_addr %s %s/%d:",
+ zlog_debug ("netlink_interface_addr %s %s/%d:",
lookup (nlmsg_str, h->nlmsg_type),
ifp->name, ifa->ifa_prefixlen);
if (tb[IFA_LOCAL])
- zlog_info (" IFA_LOCAL %s", inet_ntop (ifa->ifa_family,
+ zlog_debug (" IFA_LOCAL %s", inet_ntop (ifa->ifa_family,
RTA_DATA (tb[IFA_LOCAL]),
buf, BUFSIZ));
if (tb[IFA_ADDRESS])
- zlog_info (" IFA_ADDRESS %s", inet_ntop (ifa->ifa_family,
+ zlog_debug (" IFA_ADDRESS %s", inet_ntop (ifa->ifa_family,
RTA_DATA (tb
[IFA_ADDRESS]),
buf, BUFSIZ));
if (tb[IFA_BROADCAST])
- zlog_info (" IFA_BROADCAST %s", inet_ntop (ifa->ifa_family,
+ zlog_debug (" IFA_BROADCAST %s", inet_ntop (ifa->ifa_family,
RTA_DATA (tb
[IFA_BROADCAST]),
buf, BUFSIZ));
if (tb[IFA_LABEL] && strcmp (ifp->name, RTA_DATA (tb[IFA_LABEL])))
- zlog_info (" IFA_LABEL %s", (char *)RTA_DATA (tb[IFA_LABEL]));
+ zlog_debug (" IFA_LABEL %s", (char *)RTA_DATA (tb[IFA_LABEL]));
}
if (tb[IFA_ADDRESS] == NULL)
/* Connected route. */
if (IS_ZEBRA_DEBUG_KERNEL)
- zlog_info ("%s %s %s proto %s",
+ zlog_debug ("%s %s %s proto %s",
h->nlmsg_type ==
RTM_NEWROUTE ? "RTM_NEWROUTE" : "RTM_DELROUTE",
rtm->rtm_family == AF_INET ? "ipv4" : "ipv6",
if (IS_ZEBRA_DEBUG_KERNEL)
{
if (h->nlmsg_type == RTM_NEWROUTE)
- zlog_info ("RTM_NEWROUTE %s/%d",
+ zlog_debug ("RTM_NEWROUTE %s/%d",
inet_ntoa (p.prefix), p.prefixlen);
else
- zlog_info ("RTM_DELROUTE %s/%d",
+ zlog_debug ("RTM_DELROUTE %s/%d",
inet_ntoa (p.prefix), p.prefixlen);
}
if (IS_ZEBRA_DEBUG_KERNEL)
{
if (h->nlmsg_type == RTM_NEWROUTE)
- zlog_info ("RTM_NEWROUTE %s/%d",
+ zlog_debug ("RTM_NEWROUTE %s/%d",
inet_ntop (AF_INET6, &p.prefix, buf, BUFSIZ),
p.prefixlen);
else
- zlog_info ("RTM_DELROUTE %s/%d",
+ zlog_debug ("RTM_DELROUTE %s/%d",
inet_ntop (AF_INET6, &p.prefix, buf, BUFSIZ),
p.prefixlen);
}
n->nlmsg_flags |= NLM_F_ACK;
if (IS_ZEBRA_DEBUG_KERNEL)
- zlog_info ("netlink_talk: %s type %s(%u), seq=%u", netlink_cmd.name,
+ zlog_debug ("netlink_talk: %s type %s(%u), seq=%u", netlink_cmd.name,
lookup (nlmsg_str, n->nlmsg_type), n->nlmsg_type,
n->nlmsg_seq);
{
if (IS_ZEBRA_DEBUG_KERNEL)
{
- zlog_info
+ zlog_debug
("netlink_route_multipath() (recursive, 1 hop): "
"%s %s/%d via %s if %u, type %s",
lookup (nlmsg_str, cmd), inet_ntoa (p->u.prefix4),
{
if (IS_ZEBRA_DEBUG_KERNEL)
{
- zlog_info
+ zlog_debug
("netlink_route_multipath(): (single hop)"
"%s %s/%d via %s if %u, type %s",
lookup (nlmsg_str, cmd), inet_ntoa (p->u.prefix4),
{
if (IS_ZEBRA_DEBUG_KERNEL)
{
- zlog_info ("netlink_route_multipath() "
+ zlog_debug ("netlink_route_multipath() "
"(recursive, multihop): "
"%s %s/%d via %s if %u, type %s",
lookup (nlmsg_str, cmd), inet_ntoa (p->u.prefix4),
{
if (IS_ZEBRA_DEBUG_KERNEL)
{
- zlog_info ("netlink_route_multipath() "
+ zlog_debug ("netlink_route_multipath() "
"(multihop): "
"%s %s/%d via %s if %u, type %s",
lookup (nlmsg_str, cmd), inet_ntoa (p->u.prefix4),
if (nexthop_num == 0)
{
if (IS_ZEBRA_DEBUG_KERNEL)
- zlog_info ("netlink_route_multipath(): No useful nexthop.");
+ zlog_debug ("netlink_route_multipath(): No useful nexthop.");
return 0;
}
if (nexthop_num == 0)
{
if (IS_ZEBRA_DEBUG_KERNEL)
- zlog_info ("kernel_rtm_ipv4(): No useful nexthop.");
+ zlog_debug ("kernel_rtm_ipv4(): No useful nexthop.");
return 0;
}
if (nexthop_num == 0)
{
if (IS_ZEBRA_DEBUG_KERNEL)
- zlog_info ("kernel_rtm_ipv6_multipath(): No useful nexthop.");
+ zlog_debug ("kernel_rtm_ipv6_multipath(): No useful nexthop.");
return 0;
}
/* Logging of packet. */
if (IS_ZEBRA_DEBUG_PACKET)
- zlog_info ("Router advertisement send to %s", ifp->name);
+ zlog_debug ("Router advertisement send to %s", ifp->name);
/* Fill in sockaddr_in6. */
memset (&addr, 0, sizeof (struct sockaddr_in6));
{
u_char buf[INET6_ADDRSTRLEN];
- zlog_info ("DEBUG %s", inet_ntop (AF_INET6, &pinfo->nd_opt_pi_prefix,
+ zlog_debug ("DEBUG %s", inet_ntop (AF_INET6, &pinfo->nd_opt_pi_prefix,
buf, INET6_ADDRSTRLEN));
}
apply_mask_ipv4 (p);
if (IS_ZEBRA_DEBUG_KERNEL && gate)
- zlog_info ("rib_delete_ipv4(): route delete %s/%d via %s ifindex %d",
+ zlog_debug ("rib_delete_ipv4(): route delete %s/%d via %s ifindex %d",
inet_ntop (AF_INET, &p->prefix, buf1, BUFSIZ),
p->prefixlen,
inet_ntoa (*gate),
if (IS_ZEBRA_DEBUG_KERNEL)
{
if (gate)
- zlog_info ("route %s/%d via %s ifindex %d doesn't exist in rib",
+ zlog_debug ("route %s/%d via %s ifindex %d doesn't exist in rib",
inet_ntop (AF_INET, &p->prefix, buf1, BUFSIZ),
p->prefixlen,
inet_ntop (AF_INET, gate, buf2, BUFSIZ),
ifindex);
else
- zlog_info ("route %s/%d ifindex %d doesn't exist in rib",
+ zlog_debug ("route %s/%d ifindex %d doesn't exist in rib",
inet_ntop (AF_INET, &p->prefix, buf1, BUFSIZ),
p->prefixlen,
ifindex);
if (IS_ZEBRA_DEBUG_KERNEL)
{
if (gate)
- zlog_info ("route %s/%d via %s ifindex %d type %d doesn't exist in rib",
+ zlog_debug ("route %s/%d via %s ifindex %d type %d doesn't exist in rib",
inet_ntop (AF_INET, &p->prefix, buf1, BUFSIZ),
p->prefixlen,
inet_ntop (AF_INET, gate, buf2, BUFSIZ),
ifindex,
type);
else
- zlog_info ("route %s/%d ifindex %d type %d doesn't exist in rib",
+ zlog_debug ("route %s/%d ifindex %d type %d doesn't exist in rib",
inet_ntop (AF_INET, &p->prefix, buf1, BUFSIZ),
p->prefixlen,
ifindex,
if (IS_ZEBRA_DEBUG_KERNEL)
{
if (gate)
- zlog_info ("route %s/%d via %s ifindex %d doesn't exist in rib",
+ zlog_debug ("route %s/%d via %s ifindex %d doesn't exist in rib",
inet_ntop (AF_INET6, &p->prefix, buf1, BUFSIZ),
p->prefixlen,
inet_ntop (AF_INET6, gate, buf2, BUFSIZ),
ifindex);
else
- zlog_info ("route %s/%d ifindex %d doesn't exist in rib",
+ zlog_debug ("route %s/%d ifindex %d doesn't exist in rib",
inet_ntop (AF_INET6, &p->prefix, buf1, BUFSIZ),
p->prefixlen,
ifindex);
if (IS_ZEBRA_DEBUG_KERNEL)
{
if (gate)
- zlog_info ("route %s/%d via %s ifindex %d type %d doesn't exist in rib",
+ zlog_debug ("route %s/%d via %s ifindex %d type %d doesn't exist in rib",
inet_ntop (AF_INET6, &p->prefix, buf1, BUFSIZ),
p->prefixlen,
inet_ntop (AF_INET6, gate, buf2, BUFSIZ),
ifindex,
type);
else
- zlog_info ("route %s/%d ifindex %d type %d doesn't exist in rib",
+ zlog_debug ("route %s/%d ifindex %d type %d doesn't exist in rib",
inet_ntop (AF_INET6, &p->prefix, buf1, BUFSIZ),
p->prefixlen,
ifindex,
if (nbyte <= 0)
{
if (IS_ZEBRA_DEBUG_EVENT)
- zlog_info ("connection closed socket [%d]", sock);
+ zlog_debug ("connection closed socket [%d]", sock);
zebra_client_close (client);
return -1;
}
if (length < 3)
{
if (IS_ZEBRA_DEBUG_EVENT)
- zlog_info ("length %d is less than 3 ", length);
+ zlog_debug ("length %d is less than 3 ", length);
zebra_client_close (client);
return -1;
}
if (nbyte <= 0)
{
if (IS_ZEBRA_DEBUG_EVENT)
- zlog_info ("connection closed [%d] when reading zebra data", sock);
+ zlog_debug ("connection closed [%d] when reading zebra data", sock);
zebra_client_close (client);
return -1;
}
/* Debug packet information. */
if (IS_ZEBRA_DEBUG_EVENT)
- zlog_info ("zebra message comes from socket [%d]", sock);
+ zlog_debug ("zebra message comes from socket [%d]", sock);
if (IS_ZEBRA_DEBUG_PACKET && IS_ZEBRA_DEBUG_RECV)
- zlog_info ("zebra message received [%s] %d",
+ zlog_debug ("zebra message received [%s] %d",
zebra_command_str[command], length);
switch (command)