Skip to content

Commit

Permalink
Only print the tree if debugging.
Browse files Browse the repository at this point in the history
  • Loading branch information
dag-erling committed Dec 3, 2018
1 parent b0a67b4 commit 39e0f89
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sbin/flytrap/arp.c
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ packet_analyze_arp(const ether_flow *fl, const void *data, size_t len)
arp_register(&ap->tpa, &ap->tha);
break;
}
/* run expiry, assume packet time is <= current time */
/* run expiry */
if (arp_root.oldest < ft_time - ARP_EXPIRE) {
arp_expire(&arp_root, ft_time - ARP_EXPIRE);
ft_debug("%u nodes / %u leaves in tree", narpn, nleaves);
Expand All @@ -506,6 +506,7 @@ packet_analyze_arp(const ether_flow *fl, const void *data, size_t len)
(arp_root.oldest + ARP_EXPIRE - ft_time) / 1000,
(arp_root.oldest + ARP_EXPIRE - ft_time) % 1000);
}
arp_print_tree(stderr, &arp_root);
if (FT_LOG_LEVEL_DEBUG >= ft_log_level)
arp_print_tree(stderr, &arp_root);
return (0);
}

0 comments on commit 39e0f89

Please sign in to comment.